1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-01-03 09:05:18 +00:00
parent 96d19b6cbc
commit 21a2146e1d

4
dln.c
View file

@ -1243,7 +1243,8 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
#define translit_separator(str) (void)(str) #define translit_separator(str) (void)(str)
#endif #endif
MAYBE_UNUSED(static bool xmalloc_mismatch_p(void *handle)); #ifdef USE_DLN_DLOPEN
static bool xmalloc_mismatch_p(void *handle);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
@ -1263,6 +1264,7 @@ xmalloc_mismatch_p(void *handle)
#elif defined(__GNUC__) && (__GNUC__ >= 5) #elif defined(__GNUC__) && (__GNUC__ >= 5)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#endif
void* void*
dln_load(const char *file) dln_load(const char *file)