diff --git a/dln.c b/dln.c index 3cad6021cf..3a2960efca 100644 --- a/dln.c +++ b/dln.c @@ -1243,7 +1243,8 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine) #define translit_separator(str) (void)(str) #endif -MAYBE_UNUSED(static bool xmalloc_mismatch_p(void *handle)); +#ifdef USE_DLN_DLOPEN +static bool xmalloc_mismatch_p(void *handle); #ifdef __clang__ #pragma clang diagnostic push @@ -1263,6 +1264,7 @@ xmalloc_mismatch_p(void *handle) #elif defined(__GNUC__) && (__GNUC__ >= 5) #pragma GCC diagnostic pop #endif +#endif void* dln_load(const char *file)