summaryrefslogtreecommitdiff
path: root/w32
diff options
context:
space:
mode:
Diffstat (limited to 'w32')
-rw-r--r--w32/compat/posixfcn.c11
-rw-r--r--w32/include/dlfcn.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/w32/compat/posixfcn.c b/w32/compat/posixfcn.c
index cafc864..0a08c65 100644
--- a/w32/compat/posixfcn.c
+++ b/w32/compat/posixfcn.c
@@ -338,6 +338,17 @@ dlsym (void *handle, const char *name)
return (void *)addr;
}
+int
+dlclose (void *handle)
+{
+ if (!handle || handle == INVALID_HANDLE_VALUE)
+ return -1;
+ if (!FreeLibrary (handle))
+ return -1;
+
+ return 0;
+}
+
#endif /* MAKE_LOAD */
diff --git a/w32/include/dlfcn.h b/w32/include/dlfcn.h
index c95fee2..c8523ad 100644
--- a/w32/include/dlfcn.h
+++ b/w32/include/dlfcn.h
@@ -9,5 +9,6 @@
extern void *dlopen (const char *, int);
extern void *dlsym (void *, const char *);
extern char *dlerror (void);
+extern int dlclose (void *);
#endif /* DLFCN_H */