From a0e21f5822ae3180bd8570f11f5ea8ecbd78e7db Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 22 Apr 2013 22:20:09 +0900 Subject: [PATCH] be compilable even when _SC_PHYS_PAGES is not available Signed-off-by: YAMAMOTO Takashi Signed-off-by: Ben Pfaff --- vswitchd/system-stats.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.43.0