summaryrefslogtreecommitdiffstats
path: root/src/daemon/ltdl-bind-now.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/ltdl-bind-now.c')
-rw-r--r--src/daemon/ltdl-bind-now.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/daemon/ltdl-bind-now.c b/src/daemon/ltdl-bind-now.c
index 6821aac4..2d80fc7a 100644
--- a/src/daemon/ltdl-bind-now.c
+++ b/src/daemon/ltdl-bind-now.c
@@ -24,11 +24,11 @@
#include <config.h>
#endif
-#if HAVE_DLFCN_H
+#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
-#if HAVE_SYS_DL_H
+#ifdef HAVE_SYS_DL_H
#include <sys/dl.h>
#endif
@@ -74,7 +74,9 @@ static lt_module bind_now_open(lt_user_data d, const char *fname, lt_dladvise ad
pa_assert(fname);
if (!(m = dlopen(fname, PA_BIND_NOW))) {
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return NULL;
}
@@ -86,7 +88,9 @@ static int bind_now_close(lt_user_data d, lt_module m) {
pa_assert(m);
if (dlclose(m) != 0){
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return 1;
}
@@ -100,7 +104,9 @@ static lt_ptr bind_now_find_sym(lt_user_data d, lt_module m, const char *symbol)
pa_assert(symbol);
if (!(ptr = dlsym(m, symbol))) {
+#ifdef HAVE_LT_DLMUTEX_REGISTER
libtool_set_error(dlerror());
+#endif
return NULL;
}