summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 16:23:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-16 16:23:19 +0000
commitd62a9f00b87a378cdf1f52fe63e9bcfde62a853b (patch)
treeb221542b800d809c1c7ffa3cb7f57328b945c519 /dln.c
parentb45f04a66f65fd39b5f9521a30fc19c00143bd4c (diff)
* dln.c (dln_load): check imported addresses only when compiled
for ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dln.c b/dln.c
index 783dacc..8d2b62e 100644
--- a/dln.c
+++ b/dln.c
@@ -1265,11 +1265,13 @@ dln_load(const char *file)
goto failed;
}
+#if defined _WIN32 && defined RUBY_EXPORT
if (!rb_w32_check_imported(handle, rb_libruby_handle())) {
FreeLibrary(handle);
error = "incompatible library version";
goto failed;
}
+#endif
if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
dln_loaderror("%s - %s\n%s", dln_strerror(), buf, file);