libxl: build fix
PATCH 1/1 libxl: build fix
Hi!
Attached patch makes libxl compile on NetBSD. <sys/signal.h> is needed to get definition for SIGPIPE and SIG_IGN.
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
tools/libxl/xl.c +1 -0
@@ -26,6 +26,7 @@#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <sys/signal.h> #include <sys/socket.h> #include <sys/select.h> #include <arpa/inet.h>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
Quoted 2 lines
Attached patch makes libxl compile on NetBSD. <
sys/signal.h> is needed to get definition for SIGPIPE andSIG_IGN.
<sys/signal.h> is not a standard header file. It should be <signal.h>.
Adding
#include <signal.h>
would be correct.
Ian.
Quoted 9 lines · On Tuesday 13 April 2010 13:21:31 Ian Jackson wrote:
Christoph Egger writes ("[Xen-devel] [PATCH] libxl: build fix"):
Quoted 2 lines
Attached patch makes libxl compile on NetBSD. <
sys/signal.h> is needed to get definition for SIGPIPE andSIG_IGN.<
sys/signal.h> is not a standard header file. It should be <signal.h>.Adding
#include <signal.h>
would be correct.
On NetBSD, the SIG* defines are in <sys/signal.h> which is just included by <signal.h>
On NetBSD, both works.
But you're right, the portable fix is the prefered one.
Christoph
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"):
Quoted 3 lines
On NetBSD, the SIG* defines are in <
sys/signal.h> which is just included by <signal.h>
On NetBSD, both works.
The correct way to discover what the right #include is is not to go on a wild goose chase through headers. It is to read appropriate documentation, such as SuSv3:
http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
Every function or symbol that's in SuS has next to its description a statement of what header file(s) are needed.
Quoted 1 line
But you're right, the portable fix is the prefered one.
It's not just "portable", it is not broken. The NetBSD developers would be quite entitled to make <sys/signal.h> go away, or not contain these definitions any more. I doubt they promise not to.
Ian.
Quoted 11 lines · On Tuesday 13 April 2010 17:04:00 Ian Jackson wrote:
Christoph Egger writes ("Re: [Xen-devel] [PATCH] libxl: build fix"):
Quoted 3 lines
On NetBSD, the SIG* defines are in <
sys/signal.h> which is just included by <signal.h>
On NetBSD, both works.The correct way to discover what the right #include is is not to go on a wild goose chase through headers. It is to read appropriate documentation, such as SuSv3:
http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
Every function or symbol that's in SuS has next to its description a statement of what header file(s) are needed.
Yes, you are right. It's my fault. It should have read the manpage. It states this clearly, too.
Christoph
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632