Avoid gcc warning nested extern declaration of `environ' That declaration should be at the top level. diff -ur dbus-1.2.4.orig/dbus/dbus-spawn.c dbus-1.2.4/dbus/dbus-spawn.c --- dbus-1.2.4.orig/dbus/dbus-spawn.c 2008-08-07 20:44:36.000000000 +0200 +++ dbus-1.2.4/dbus/dbus-spawn.c 2008-11-21 13:40:45.000000000 +0100 @@ -36,6 +36,8 @@ #include #endif +extern char **environ; + /** * @addtogroup DBusInternalsUtils * @{ @@ -914,8 +916,6 @@ if (envp == NULL) { - extern char **environ; - _dbus_assert (environ != NULL); envp = environ; diff -ur dbus-1.2.4.orig/dbus/dbus-sysdeps.c dbus-1.2.4/dbus/dbus-sysdeps.c --- dbus-1.2.4.orig/dbus/dbus-sysdeps.c 2008-08-07 20:44:36.000000000 +0200 +++ dbus-1.2.4/dbus/dbus-sysdeps.c 2008-11-21 13:40:50.000000000 +0100 @@ -47,6 +47,8 @@ #include #endif +extern char **environ; + _DBUS_DEFINE_GLOBAL_LOCK (win_fds); _DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache); _DBUS_DEFINE_GLOBAL_LOCK (system_users); @@ -210,7 +212,6 @@ _dbus_get_environment (void) { int i, length; - extern char **environ; char **environment; _dbus_assert (environ != NULL);