GNOME Bugzilla – Bug 598572
wrong wait.h included
Last modified: 2011-05-19 15:59:21 UTC
Created attachment 145524 [details] [review] Include correct header the wrong wait.h file is included by metacity's src/core/main.c on OpenBSD. attached patch fixes this.
Does OpenBSD also have <wait.h> (but this situation requires <sys/wait.h> instead), or is the wait.h just in a different location on this platform?
OpenBSD doesn't have <wait.h>. The only wait.h is <sys/wait.h>.
A more portable solution is to autoconf test for which one exists and use it rather than having to "know" what each platform does specifically. Looks like darwin also appears to use <sys/wait.h> rather than <wait.h>. Probably something like: configure.in: +AC_CHECK_HEADERS([wait.h sys/wait.h]) src/core/main.c: +#ifdef HAVE_WAIT_H #include <wait.h> +#else +#ifdef HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif +#endif
That should do the trick :)
*** Bug 574441 has been marked as a duplicate of this bug. ***
Why do you want such checks? POSIX mandates sys/wait.h and doesnt talk about wait.h at all [1]. On my linux/glibc system, /usr/include/wait.h contains the single line "#include <sys/wait.h>"... [1] http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
Created attachment 147030 [details] [review] proposed patch
i thought so too, 7 months ago
Are there any problems with the proposed patch by Alexis? (if not, can we get this trivial patch in please? :)
(In reply to comment #6) > Why do you want such checks? POSIX mandates sys/wait.h and doesnt talk about > wait.h at all [1]. > On my linux/glibc system, /usr/include/wait.h contains the single line > "#include <sys/wait.h>"... > > > [1] http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html I totally agree, sys/wait.h is POSIX , wait.h not. Have a look at sys/wait.h : /* * POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h> */ so there is nothing to check or to demonstrate, this is the norm.
Please get this in..
ping? Any metacity developers alive?
What's delaying this?
So, both metacity and it's developers have left the building? No activity in more than a year on this trivial fix?
Just for future reference, when dealing with portability issues, the first thing to check in GNOME is: What Would GLib Do? glib/gspawn.c just has: #include <sys/wait.h> So this is clearly right.