summaryrefslogtreecommitdiff
path: root/ext/dl/dl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/dl.h')
-rw-r--r--ext/dl/dl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/dl.h b/ext/dl/dl.h
index 753bd1c976..fb904bc561 100644
--- a/ext/dl/dl.h
+++ b/ext/dl/dl.h
@@ -24,7 +24,7 @@
# include <windows.h>
# define dlclose(ptr) FreeLibrary((HINSTANCE)ptr)
# define dlopen(name,flag) ((void*)LoadLibrary(name))
-# define dlerror() "unknown error"
+# define dlerror() strerror(rb_w32_map_errno(GetLastError()))
# define dlsym(handle,name) ((void*)GetProcAddress(handle,name))
# define RTLD_LAZY -1
# define RTLD_NOW -1