summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-03 09:05:18 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-03 09:05:18 (GMT)
commit21a2146e1d4a8e7c27e36966bf4bb73cf48e9d7b (patch)
tree9eae9321b8c36e77d30fd881fb2394e55f20bb8d
parent96d19b6cbcdf628e8484d588fa726454468c8d78 (diff)
dln.c: xmalloc_mismatch_p with dlopen
* dln.c (xmalloc_mismatch_p): define only when using dlopen, otherwise dlsym is not available too, and should be used then. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--dln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dln.c b/dln.c
index 3cad602..3a2960e 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)