From: Edward Tomasz NapieraƂa Date: Tue, 1 Nov 2011 12:25:49 +0000 (+0100) Subject: Fix build on FreeBSD. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ca00f6f1789a510bc4dbb73386a8dae197531df;p=openvswitch Fix build on FreeBSD. Patch below fixes build on FreeBSD; tested on 10.0-CURRENT. Signed-off-by: Edward Tomasz Napierala Signed-off-by: Ben Pfaff --- diff --git a/configure.ac b/configure.ac index 3b87e7e0..7bac8712 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,7 @@ AC_SYS_LARGEFILE AC_SEARCH_LIBS([pow], [m]) AC_SEARCH_LIBS([clock_gettime], [rt]) +AC_SEARCH_LIBS([timer_create], [rt]) OVS_CHECK_COVERAGE OVS_CHECK_NDEBUG diff --git a/lib/meta-flow.h b/lib/meta-flow.h index 696b8ca6..1242f9ff 100644 --- a/lib/meta-flow.h +++ b/lib/meta-flow.h @@ -17,6 +17,8 @@ #ifndef META_FLOW_H #define META_FLOW_H 1 +#include +#include #include #include "flow.h" #include "packets.h" diff --git a/lib/odp-util.c b/lib/odp-util.c index 33672c8c..1e20f49d 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -19,6 +19,7 @@ #include "odp-util.h" #include #include +#include #include #include #include diff --git a/lib/ofp-util.c b/lib/ofp-util.c index bf03a820..b1d35cbb 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -18,6 +18,8 @@ #include "ofp-print.h" #include #include +#include +#include #include #include #include "autopath.h" diff --git a/lib/packets.c b/lib/packets.c index 815d4e66..b704276c 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -18,6 +18,7 @@ #include "packets.h" #include #include +#include #include #include #include "byte-order.h" diff --git a/ofproto/in-band.h b/ofproto/in-band.h index f7f2ec65..9de72ee6 100644 --- a/ofproto/in-band.h +++ b/ofproto/in-band.h @@ -20,6 +20,7 @@ #include #include #include +#include struct flow; struct in_band; diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index b8f8d7e3..a3b4db44 100644 --- a/vswitchd/system-stats.c +++ b/vswitchd/system-stats.c @@ -95,7 +95,11 @@ get_memory_stats(struct shash *stats) if (!LINUX) { unsigned int pagesize = get_page_size(); long int phys_pages = sysconf(_SC_PHYS_PAGES); +#ifdef _SC_AVPHYS_PAGES long int avphys_pages = sysconf(_SC_AVPHYS_PAGES); +#else + long int avphys_pages = 0; +#endif int mem_total, mem_used; if (pagesize <= 0 || phys_pages <= 0 || avphys_pages <= 0) {