Consistently include <config.h> in all C source files and never in header files.
[platform/upstream/dbus.git] / dbus / dbus-sysdeps.c
index 1f4c3a2..f9c6fc5 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include <config.h>
 #include "dbus-internals.h"
 #include "dbus-sysdeps.h"
 #include "dbus-threads.h"
@@ -49,6 +50,9 @@ _DBUS_DEFINE_GLOBAL_LOCK (system_users);
 
 #ifdef DBUS_WIN
   #include <stdlib.h>
+#elif (defined __APPLE__)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
 #else
 extern char **environ;
 #endif