Support dlopen(NULL, ...) on HPUX.
[kai/samba.git] / source / lib / replace / dlfcn.c
index 42848848e8703dc488765213ca579065b758cc2a..3b109d7e404695fedc102f91dfb23ab40e56ed9d 100644 (file)
@@ -35,6 +35,8 @@ void *rep_dlopen(const char *name, int flags)
 #endif
 {
 #ifdef HAVE_SHL_LOAD
+       if (name == NULL)
+               return PROG_HANDLE;
        return (void *)shl_load(name, flags, 0);
 #else
        return NULL;