After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624788 - gdbusaddress.c should include glibconfig.h so that sys/wait.h is included
gdbusaddress.c should include glibconfig.h so that sys/wait.h is included
Status: RESOLVED DUPLICATE of bug 624754
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal critical
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-07-20 00:45 UTC by Alberto Ruiz
Modified: 2010-07-20 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds glibconfig.h at the top of gdbusaddress.c (276 bytes, application/octet-stream)
2010-07-20 00:45 UTC, Alberto Ruiz
Details

Description Alberto Ruiz 2010-07-20 00:45:05 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.
Comment 1 Allison Karlitskaya (desrt) 2010-07-20 14:39:35 UTC

*** This bug has been marked as a duplicate of bug 624754 ***