diff options
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r-- | source3/lib/system.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index 38b2e79ac6..91f4f8a333 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1081,3 +1081,34 @@ int sys_pclose(int fd) return -1; return wstatus; } + +/************************************************************************** + Wrappers for dlopen, dlsym, dlclose. +****************************************************************************/ + +void *sys_dlopen(const char *name, int flags) +{ +#ifdef HAVE_LIBDL + return dlopen(name, flags); +#else + return NULL; +#endif +} + +void *sys_dlsym(void *handle, char *symbol) +{ +#ifdef HAVE_LIBDL + return dlsym(handle, symbol); +#else + return NULL; +#endif +} + +int sys_dlclose (void *handle) +{ +#ifdef HAVE_LIBDL + return dlclose(handle); +#else + return 0; +#endif +} |