X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcdll.c;h=2c5de41d5c07748cf270da59523419b8f83f1ae1;hp=59ca44d50b778af146017d794194294f96567d36;hb=a788ad407a51e84cfd41fedc6c053e62283ea2d7;hpb=72c2de619079457f7a68100eb13385275a424a23 diff --git a/lib/silcutil/silcdll.c b/lib/silcutil/silcdll.c index 59ca44d5..2c5de41d 100644 --- a/lib/silcutil/silcdll.c +++ b/lib/silcutil/silcdll.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2007 Pekka Riikonen + Copyright (C) 2007 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ */ -#include "silc.h" +#include "silcruntime.h" /* Load shared object */ @@ -48,7 +48,9 @@ SilcDll silc_dll_load(const char *object_path) void silc_dll_close(SilcDll dll) { #ifdef SILC_UNIX +#if defined(HAVE_DLOPEN) dlclose(dll); +#endif /* HAVE_DLOPEN */ #elif SILC_WIN32 FreeLibrary(dll); #else @@ -61,7 +63,9 @@ void silc_dll_close(SilcDll dll) void *silc_dll_getsym(SilcDll dll, const char *symbol) { #ifdef SILC_UNIX +#if defined(HAVE_DLOPEN) return (void *)dlsym(dll, symbol); +#endif /* HAVE_DLOPEN */ #elif SILC_WIN32 return (void *)GetProcAddress(dll, symbol); #else @@ -77,7 +81,9 @@ void *silc_dll_getsym(SilcDll dll, const char *symbol) const char *silc_dll_error(SilcDll dll) { #ifdef SILC_UNIX +#if defined(HAVE_DLOPEN) return dlerror(); +#endif /* HAVE_DLOPEN */ #elif SILC_WIN32 return NULL; #else