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.
#include <sys/socket.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
#include "viralloc.h"
#include "virbitmap.h"
# include <sys/socket.h>
# include <errno.h>
# include <arpa/inet.h>
+# include <netinet/in.h>
int bind(int sockfd ATTRIBUTE_UNUSED,
const struct sockaddr *addr,