Fix building again libtool/ltdl 2.2.4.
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 10:39:04 +0000 (12:39 +0200)
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 8 Aug 2008 10:39:04 +0000 (12:39 +0200)
On changeset f1d2bf84089b1e5b5988a5e5d6d571a507a52337 support for
libtool 2.2 was broken as libtool_set_error was not defined anymore on
that version. Fix this by also putting under #ifdef the calls to that
function.

src/daemon/ltdl-bind-now.c

index 4007724..1215d12 100644 (file)
@@ -102,7 +102,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;
     }
 
@@ -114,7 +116,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;
     }
 
@@ -128,7 +132,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;
     }