diff options
author | Edward Tomasz NapieraĆa <trasz@freebsd.org> | 2011-11-01 13:25:49 +0100 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-11-01 09:11:52 -0700 |
commit | 6ca00f6f1789a510bc4dbb73386a8dae197531df (patch) | |
tree | 6f098ffdddb58cddfa8be8508c4a544f3bafedc6 /vswitchd | |
parent | 52fa1bcf5f8b388f4854d491cc218221efbe37f1 (diff) |
Fix build on FreeBSD.
Patch below fixes build on FreeBSD; tested on 10.0-CURRENT.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/system-stats.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |