GNOME Bugzilla – Bug 624788
gdbusaddress.c should include glibconfig.h so that sys/wait.h is included
Last modified: 2010-07-20 14:39:35 UTC
Created attachment 166188 [details] Adds glibconfig.h at the top of gdbusaddress.c In my setup (a pretty standard jhbuild/ubuntu host), I was getting this compiler error: libtool: link: gcc -g -O2 -Wall -o .libs/gio-querymodules gio-querymodules.o -L/home/aruiz/opt/gnome3.0/lib ../glib/.libs/libglib-2.0.so ../gobject/.libs/libgobject-2.0.so ../gmodule/.libs/libgmodule-2.0.so ./.libs/libgio-2.0.so -Wl,-rpath -Wl,/home/aruiz/opt/gnome3.0/lib ./.libs/libgio-2.0.so: undefined reference to `WIFEXITED' ./.libs/libgio-2.0.so: undefined reference to `WEXITSTATUS' collect2: ld returned 1 exit status Which was caused by this: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_ENABLE_DEBUG -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/home/aruiz/opt/gnome3.0/lib/gio/modules\" -DG_DISABLE_SINGLE_INCLUDES -pthread -g -O2 -Wall -MT gdbusaddress.lo -MD -MP -MF .deps/gdbusaddress.Tpo -c gdbusaddress.c -fPIC -DPIC -o .libs/gdbusaddress.o gdbusaddress.c: In function ‘get_session_address_dbus_launch’: gdbusaddress.c:1056: warning: implicit declaration of function ‘WIFEXITED’ gdbusaddress.c:1070: warning: implicit declaration of function ‘WEXITSTATUS’ Investigating a bit, I figured out that gdbusaddress.c was not including glibconfig.h before the ifdef that enables <sys/wait.h> inclusion in case we are on unix, but further down in the file, it was implicitly included so the rest of the code was assuming wait was included.
*** This bug has been marked as a duplicate of bug 624754 ***