From: Mathieu Rene Date: Sat, 14 Feb 2009 21:26:30 +0000 (+0000) Subject: MODLANG-99 Work around broken uClibc X-Git-Tag: v1.0.3~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9bfb0c509fa622d0a2bdc8e340c069c820e99fe;p=thirdparty%2Ffreeswitch.git MODLANG-99 Work around broken uClibc git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12014 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_dso.c b/src/switch_dso.c index 8d5b965419..259bf1fc23 100644 --- a/src/switch_dso.c +++ b/src/switch_dso.c @@ -97,7 +97,13 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) { } if (lib == NULL) { - *err = strdup(dlerror()); + const char *dlerr = dlerror(); + /* Work around broken uclibc returning NULL on both dlopen() and dlerror() */ + if (dlerr) { + *err = strdup(dlerr); + } else { + *err = strdup("Unknown error"); + } } return lib; }