]> git.sesse.net Git - vlc/blobdiff - src/vlc.c
typo
[vlc] / src / vlc.c
index 77dd66f429ad07006b0378eb8406688687d9b6f7..11a7c632d29826d61d3e58cc65f3d640edefa93b 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -31,6 +31,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
+#ifdef __GLIBC__
+#include <dlfcn.h>
+#endif
 
 
 /* Explicit HACK */
@@ -63,6 +66,20 @@ int main( int i_argc, const char *ppsz_argv[] )
 {
     int i_ret;
 
+#   ifdef __GLIBC__
+    if (dlsym (RTLD_NEXT, "inet6_rth_add") && !dlsym (RTLD_NEXT, "qsort_r"))
+    {
+        /* Way too many Linux users have glibc 2.5-2.7 that keeps crashing
+         * inside its non-thread-safe dcgettext(). */
+        /* Hopefully glibc 2.8 will eventually work, not sure though */
+        fprintf (stderr,
+"***************************************************\n"
+"*** glibc version with broken libintl detected. ***\n"
+"*** Messages localization will be disabled.     ***\n"
+"***************************************************\n");
+        setenv ("LC_MESSAGES", "C", 1);
+    }
+#   endif
     setlocale (LC_ALL, "");
 
 #ifndef __APPLE__
@@ -236,7 +253,8 @@ static void *SigHandler (void *data)
     for (;;)
     {
         int i_signal, state;
-        (void)sigwait (&fullset, &i_signal);
+        if( sigwait (&fullset, &i_signal) != 0 )
+            continue;
 
 #ifdef __APPLE__
         /* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread