]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODLANG-99 Work around broken uClibc
authorMathieu Rene <mrene@avgs.ca>
Sat, 14 Feb 2009 21:26:30 +0000 (21:26 +0000)
committerMathieu Rene <mrene@avgs.ca>
Sat, 14 Feb 2009 21:26:30 +0000 (21:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12014 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_dso.c

index 8d5b9654195b7e7ceac64cd255bade9b56a74ae7..259bf1fc23bce53574673d90061d274918fafa78 100644 (file)
@@ -97,7 +97,13 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) {
        }\r
 \r
        if (lib == NULL) {\r
-               *err = strdup(dlerror());\r
+               const char *dlerr = dlerror();\r
+               /* Work around broken uclibc returning NULL on both dlopen() and dlerror() */\r
+               if (dlerr) {\r
+                       *err = strdup(dlerr);\r
+               } else {\r
+                       *err = strdup("Unknown error");\r
+               }\r
        }\r
        return lib;\r
 }\r