dbus: fix 64-bit compiler warnings
[platform/upstream/dbus.git] / dbus / dbus-sysdeps.c
index d004ff0..20bb894 100644 (file)
@@ -52,6 +52,8 @@
 #elif (defined __APPLE__)
 # include <crt_externs.h>
 # define environ (*_NSGetEnviron())
+#elif HAVE_DECL_ENVIRON && defined(HAVE_UNISTD_H)
+# include <unistd.h>
 #else
 extern char **environ;
 #endif
@@ -668,9 +670,9 @@ _dbus_error_from_errno (int error_number)
     case ENOENT:
       return DBUS_ERROR_FILE_NOT_FOUND;
 #endif
+    default:
+      return DBUS_ERROR_FAILED;
     }
-
-  return DBUS_ERROR_FAILED;
 }
 
 /**
@@ -752,7 +754,7 @@ _dbus_strerror_from_errno (void)
 }
 
 /**
- * Log a message to the system log file (e.g. syslog on Unix).
+ * Log a message to the system log file (e.g. syslog on Unix) and/or stderr.
  *
  * @param severity a severity value
  * @param msg a printf-style format string