[libvirt] [PATCH] build: Include sys/wait.h in commandtest.c

Eric Blake eblake at redhat.com
Tue Mar 4 13:23:45 UTC 2014


On 03/04/2014 12:45 AM, Ján Tomko wrote:
> Commit 631923e used a few macros from sys/wait.h without including
> it. On Linux, they were also defined in stdlib.h, but on FreeBSD
> the build failed:
> 
> ../../tests/commandtest.c: In function 'test1':
> warning: implicit declaration of function 'WIFEXITED'
> warning: nested extern declaration of 'WIFEXITED' [-Wnested-externs]

Bah - FreeBSD has a bug.  POSIX requires these macros in <stdlib.h>:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html#tag_13_50

Ah - gnulib works around it already!  But only if you use the
'system-posix' module, which libvirt isn't doing yet.  Guess I'll do the
obvious followup patch to bootstrap.conf to work around the <stdlib.h>
FreeBSD bug for all platforms.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140304/925d9fc9/attachment-0001.sig>


More information about the libvir-list mailing list