From: YAMAMOTO Takashi Date: Mon, 22 Apr 2013 13:20:09 +0000 (+0900) Subject: be compilable even when _SC_PHYS_PAGES is not available X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a0e21f5822ae3180bd8570f11f5ea8ecbd78e7db;p=sliver-openvswitch.git be compilable even when _SC_PHYS_PAGES is not available Signed-off-by: YAMAMOTO Takashi Signed-off-by: Ben Pfaff --- diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index f6795165b..2e18b1b6b 100644 --- a/vswitchd/system-stats.c +++ b/vswitchd/system-stats.c @@ -97,7 +97,11 @@ get_memory_stats(struct smap *stats) { if (!LINUX_DATAPATH) { unsigned int pagesize = get_page_size(); +#ifdef _SC_PHYS_PAGES long int phys_pages = sysconf(_SC_PHYS_PAGES); +#else + long int phys_pages = 0; +#endif #ifdef _SC_AVPHYS_PAGES long int avphys_pages = sysconf(_SC_AVPHYS_PAGES); #else