]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virnuma: Actually build huge page code
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Jun 2014 13:56:46 +0000 (15:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Jun 2014 14:24:02 +0000 (16:24 +0200)
One of previous commits (e6258a33) tried to build the huge page code
only on Linux since it's Linux centric indeed. But it failed miserably
as it used 'WITH_LINUX' which is an automake conditional not a gcc
one. In the sources we need to use __linux__.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnuma.c

index 1745649f9374902a1757139e103bad709352e6a1..f6354c9d89962dbc77e38f782ea5900f337f463d 100644 (file)
@@ -512,8 +512,8 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
 #endif
 
 
-/* currently all the hugepage stuff below is linux only */
-#if WITH_LINUX
+/* currently all the huge page stuff below is linux only */
+#ifdef __linux__
 
 # define HUGEPAGES_NUMA_PREFIX "/sys/devices/system/node/"
 # define HUGEPAGES_SYSTEM_PREFIX "/sys/kernel/mm/hugepages/"
@@ -849,7 +849,7 @@ virNumaGetPages(int node,
 }
 
 
-#else /* #if WITH_LINUX */
+#else /* #ifdef __linux__ */
 int
 virNumaGetPageInfo(int node ATTRIBUTE_UNUSED,
                    unsigned int page_size ATTRIBUTE_UNUSED,
@@ -873,4 +873,4 @@ virNumaGetPages(int node ATTRIBUTE_UNUSED,
                    _("page info is not supported on this platform"));
     return -1;
 }
-#endif /* #if WITH_LINUX */
+#endif /* #ifdef __linux__ */