Coverity fixes
[claws.git] / src / crash.c
index 8697ca510f05d81875f0076d8f84cbd6345f70cd..d3c5022af0558494781a01cd7c089d8c6182f720 100644 (file)
@@ -42,7 +42,7 @@
 #      include <sys/utsname.h>
 #endif
 
-#if defined(__GNU_LIBRARY__)
+#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
 #      include <gnu/libc-version.h>
 #endif
 
@@ -333,7 +333,10 @@ static void crash_debug(unsigned long crash_pid,
        int choutput[2];
        pid_t pid;
 
-       pipe(choutput);
+       if (pipe(choutput) == -1) {
+               g_print("can't pipe - error %s", errno);
+               return;
+       }
 
        if (0 == (pid = fork())) {
                char *argp[10];
@@ -443,7 +446,9 @@ static const gchar *get_compiled_in_features(void)
  */
 static const gchar *get_lib_version(void)
 {
-#if defined(__GNU_LIBRARY__)
+#if defined(__UCLIBC__)
+       return g_strdup_printf("uClibc %i.%i.%i", __UCLIBC_MAJOR__, __UCLIBC_MINOR__, __UCLIBC_SUBLEVEL__);
+#elif defined(__GNU_LIBRARY__)
        return g_strdup_printf("GNU libc %s", gnu_get_libc_version());
 #else
        return g_strdup(_("Unknown"));