summaryrefslogtreecommitdiff
path: root/common/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/compat.c')
-rw-r--r--common/compat.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/common/compat.c b/common/compat.c
index 970e5ed..692e2ca 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -278,12 +278,6 @@ p11_dl_error (void)
return msg_buf;
}
-void
-p11_dl_close (void *dl)
-{
- FreeLibrary (dl);
-}
-
int
p11_thread_create (p11_thread_t *thread,
p11_thread_routine routine,
@@ -861,6 +855,17 @@ strerror_r (int errnum,
#endif /* HAVE_STRERROR_R */
+void
+p11_dl_close (void *dl)
+{
+#ifdef OS_WIN32
+ FreeLibrary (dl);
+#else
+ (void) dlclose (dl);
+#endif
+}
+
+
#ifdef OS_UNIX
#include <unistd.h>