summaryrefslogtreecommitdiff
path: root/gc_dlopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc_dlopen.c')
-rw-r--r--gc_dlopen.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gc_dlopen.c b/gc_dlopen.c
index 39074f76..e466d65c 100644
--- a/gc_dlopen.c
+++ b/gc_dlopen.c
@@ -22,9 +22,7 @@
/* file to avoid having to link against libdl.{a,so} if the client */
/* doesn't call dlopen. Of course this fails if the collector is in */
/* a dynamic library. -HB */
-
-#if defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS) \
- && !defined(GC_WIN32_PTHREADS) && !defined(NACL)
+#if defined(GC_PTHREADS) && !defined(GC_NO_DLOPEN)
#undef GC_MUST_RESTORE_REDEFINED_DLOPEN
#if defined(dlopen) && !defined(GC_USE_LD_WRAP)
@@ -60,8 +58,6 @@ static void disable_gc_for_dlopen(void)
/* GC_register_dynamic_libraries. Should probably happen for */
/* other operating systems, too. */
-#include <dlfcn.h>
-
/* This is similar to WRAP/REAL_FUNC() in pthread_support.c. */
#ifdef GC_USE_LD_WRAP
# define WRAP_DLFUNC(f) __wrap_##f
@@ -102,4 +98,4 @@ GC_API void * WRAP_DLFUNC(dlopen)(const char *path, int mode)
# define dlopen GC_dlopen
#endif
-#endif /* GC_PTHREADS */
+#endif /* GC_PTHREADS && !GC_NO_DLOPEN */