GNOME Bugzilla – Bug 126377
[patch] fix dumpkeys.c compilation on NetBSD/sparc-1.5
Last modified: 2005-08-15 01:37:46 UTC
I got the following compile error: <-- snip --> ... gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/local/include/fr eetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/l ocal/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1 .0 -I/usr/local/include/pango-1.0 -I/usr/X11R6/include -I/usr/X11R6/include - O2 -mcpu=v8 -I/usr/X11R6/include -I/usr/X11R6/include -O2 -mcpu=v8 -c `test -f 'dumpkeys.c' || echo './'`dumpkeys.c In file included from dumpkeys.c:22: /usr/include/sys/select.h:46: parse error before `pid_t' /usr/include/sys/select.h:46: warning: no semicolon at end of struct or union /usr/include/sys/select.h:48: parse error before `}' gmake[2]: *** [dumpkeys.o] Error 1 gmake[2]: Leaving directory `/aux/adrian/build/vte-0.11.10/src' <-- snip --> pid_t is defined in /usr/include/sys/types.h . I'll attach a fix in a minute.
Created attachment 21253 [details] [review] fix for this problem
Adding the PATCH keyword and upgrading the priority to High due to the attached fix.
Bumping priority to urgent and adding the portability keyword.
Does it have to be included before <sys/select.h> or doesn't that matter? I see <sys/types.h> is in the source now, but not guarded. Adding the guards is a good idea though
The parse error is in select.h - therefore types.h has to be included before select.h so that the pid_t definition is available when select.h gets included.
This fixes compile errors on Darwin too - nice work :)
Created attachment 37484 [details] [review] new patch Commiting this patch since it seems <sys/types.h> has snuck in later, but still after <sys/select.h>
*** Bug 166091 has been marked as a duplicate of this bug. ***