GNOME Bugzilla – Bug 624754
gdbusaddress.c missing sys/wait.h
Last modified: 2010-07-22 13:01:47 UTC
line 27 (#include <sys/wait.h>) in gio/gdbusaddress.c (in v2.25.11) needs to be guarded with: #ifdef G_OS_WIN32 #include <sys/wait.h> #endif sys/wait.h doesn't exist on windows (or at least with the mingw-w64 compiler I'm using). Adding those guards allowed compilation to proceed normally.
Created attachment 166168 [details] [review] gdbusaddress.c patch
Wait, shouldn't the #include be guarded between ifdef G_OS_UNIX instead? I mean, we only use the WIFEXITED and WEXITSTATUS in ifdef G_OS_UNIX code. David, any chance you can try this patch instead? diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c index afc8ec6..39fc3bb 100644 --- a/gio/gdbusaddress.c +++ b/gio/gdbusaddress.c @@ -24,7 +24,9 @@ #include <stdlib.h> #include <string.h> +#ifdef G_OS_UNIX #include <sys/wait.h> +#endif #include <stdio.h> #include <errno.h>
Whoops - you're exactly right. Should be #ifndef or what you have -- I did that locally but in creating the patch and submitting my comment I accidentally copied an earlier mistake.
Compiled fine with that patch.
OK, fixed here: http://git.gnome.org/browse/glib/commit/?id=c7c573afb6eef461bfe70bb848c90b1d58b3d4d9 Thanks.
Created attachment 166197 [details] [review] gdbus: Include glib.h The G_OS_* defines are provided by glibconfig.h, which comes by including glib.h.
*** Bug 624828 has been marked as a duplicate of this bug. ***
*** Bug 624788 has been marked as a duplicate of this bug. ***
fixed this.
works fine now.