aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-19 01:16:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-19 01:16:50 +0000
commit74a782f1a54df859f811b8a7239d99169636ca80 (patch)
treebeaecbe861247523a171c6799c317d855353ed4c
parenta9a81532315fc8d6b09337cd717512403a9e4af8 (diff)
downloadruby-74a782f1a54df859f811b8a7239d99169636ca80.tar.gz
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/trunk@56832 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 5af9a57802..f52fc9f021 100644
--- a/dln.c
+++ b/dln.c
@@ -1333,7 +1333,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