MODLANG-99 Work around broken uClibc

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12014 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-02-14 21:26:30 +00:00
parent d34e2c4b9a
commit f9bfb0c509

View File

@ -97,7 +97,13 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) {
} }
if (lib == NULL) { 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; return lib;
} }