summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl')
-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)