diff --git a/c/fake/dlfcn.h b/c/fake/dlfcn.h index 2c29be7..e76adc9 100644 --- a/c/fake/dlfcn.h +++ b/c/fake/dlfcn.h @@ -1,11 +1,7 @@ /* * This include file is for systems which do not have dynamic loading. */ -#if ! defined(HAVE_DLOPEN) - extern void *dlopen(char *filename, int flags); extern char *dlerror(void); extern void *dlsym(void *lib, char *name); extern int dlclose(void *lib); - -#endif diff --git a/c/fake/libdl1.c b/c/fake/libdl1.c index 5d0049d..e59e974 100644 --- a/c/fake/libdl1.c +++ b/c/fake/libdl1.c @@ -7,11 +7,16 @@ #include "sysdep.h" #include #include -#include "../fake/dlfcn.h" #ifdef USCORE #include #endif +#if defined(HAVE_DLOPEN) +#include +#else +#include "../fake/dlfcn.h" +#endif + #if ! defined(NLIST_HAS_N_NAME) #define n_name n_un.n_name #endif diff --git a/c/unix/dynamo.c b/c/unix/dynamo.c index 9ab5bd1..1231513 100644 --- a/c/unix/dynamo.c +++ b/c/unix/dynamo.c @@ -7,8 +7,12 @@ #include #include "sysdep.h" #include "scheme48.h" -#include "../fake/dlfcn.h" +#if defined(HAVE_DLOPEN) +#include +#else +#include "../fake/dlfcn.h" +#endif #if defined(RTLD_NOW) #define DLOPEN_MODE RTLD_NOW