[PATCH] build: fix build on BSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
other headers (the way Linux does it), conforming applications are
required to get it through netinet/in.h.

* src/util/virportallocator.c: Include header for struct
sockaddr_in.
---

Pushing under the build-breaker rule.

 src/util/virportallocator.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c
index 35f2157..590bb57 100644
--- a/src/util/virportallocator.c
+++ b/src/util/virportallocator.c
@@ -23,6 +23,7 @@

 #include <sys/socket.h>
 #include <arpa/inet.h>
+#include <netinet/in.h>

 #include "viralloc.h"
 #include "virbitmap.h"
-- 
1.8.0.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]