summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-22 12:45:32 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-22 12:45:32 +0000
commit2b7e8f86e18f7d81a1b6962809e0be032ac39006 (patch)
treecd458a0cf2aed7b3dad3db3f3f6f0c6c8b8623bf /ext
parent58a6a679230a78314bd33181729c5e6435f8cd60 (diff)
merge revision(s) 32586:
* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror() before calling dlsym(). [ruby-dev:44091] [Bug #5021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/handle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index ce04acbe21..eea8697e06 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -305,6 +305,9 @@ dlhandle_sym(void *handle, const char *name)
void (*func)();
rb_secure(2);
+#ifdef HAVE_DLERROR
+ dlerror();
+#endif
func = (void (*)())(VALUE)dlsym(handle, name);
CHECK_DLERROR;
#if defined(FUNC_STDCALL)