]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix build on BSD
authorEric Blake <eblake@redhat.com>
Thu, 17 Jan 2013 23:29:38 +0000 (16:29 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 17 Jan 2013 23:39:10 +0000 (16:39 -0700)
commitf403bdc1891d5f7e20f268a592b2fa9fb1e2566f
treec2b8d34a04cde50ccac11b53f5642880a8b02709
parent7d31dd6494c1716b77ab6069e75e0b0883978347
build: fix build on BSD

A build on FreeBSD failed with:
util/virportallocator.c:108: error: storage size of 'addr' isn't known
util/virportallocator.c:123: error: 'INADDR_ANY' undeclared (first use in this function)

It turns out that while POSIX allows sockaddr_in to leak in through
<arpa/inet.h> (the way Linux does it), it is not mandatory, and
conforming applications are required to get it through <netinet/in.h>.

* src/util/virportallocator.c: Include header for struct
sockaddr_in.
* tests/virportallocatortest.c: Likewise.
src/util/virportallocator.c
tests/virportallocatortest.c