BUG: https://bugzilla.samba.org/show_bug.cgi?id=10572
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
void *handle = NULL;
int i;
-#ifdef HAVE_APPLE
- return RTLD_NEXT;
-#endif
-
#ifdef RTLD_DEEPBIND
flags |= RTLD_DEEPBIND;
#endif
}
if (handle == NULL) {
+#ifdef RTLD_NEXT
+ handle = swrap.libc_handle = swrap.libsocket_handle = RTLD_NEXT;
+#else
SWRAP_LOG(SWRAP_LOG_ERROR,
"Failed to dlopen library: %s\n",
dlerror());
exit(-1);
+#endif
}
return handle;