summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-16 19:09:23 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-16 19:09:23 +0000
commitdb4eec7249f8e557cf613e267f4d3455d4da3267 (patch)
tree0bd6ac7c3937e5a7de9ee7b8d6b3938401f1ea3d /dln.c
parentc6250c600e2ccae73392415e383fd914c124600c (diff)
merge revision(s) 56832: [Backport #12956]
dln.c: raise LoadError * dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [ruby-core:78200] [Bug #12956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dln.c b/dln.c
index 51545fbbb2..0f918af090 100644
--- a/dln.c
+++ b/dln.c
@@ -1331,7 +1331,9 @@ dln_load(const char *file)
void *ex = dlsym(handle, EXTERNAL_PREFIX"ruby_xmalloc");
if (ex && ex != ruby_xmalloc) {
-# if defined __APPLE__
+# if defined __APPLE__ && \
+ defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
+ (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11)
/* dlclose() segfaults */
rb_fatal("%s - %s", incompatible, file);
# else