]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: fix nodeinfo build on non-Linux platforms
authorEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 23:04:50 +0000 (17:04 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 18 Sep 2012 23:48:07 +0000 (17:48 -0600)
Commit aaa8ab3 added new static functions that are only used on Linux;
but commit 22acfdc didn't go far enough to fix compiler issues.

* src/nodeinfo.c (nodeSetMemoryParameterValue)
(nodeGetMemoryParameterValue): Conditionally compile based on use.

src/nodeinfo.c

index 302e0175d1324b4477f9ad13bdd599597618495e..b2de60fe9ede055511b4d16795425ec7f7a225fd 100644 (file)
@@ -931,6 +931,7 @@ nodeGetCPUmap(virConnectPtr conn ATTRIBUTE_UNUSED,
 #endif
 }
 
+#ifdef __linux__
 static int
 nodeSetMemoryParameterValue(const char *field,
                             virTypedParameterPtr param)
@@ -964,6 +965,7 @@ cleanup:
     VIR_FREE(strval);
     return ret;
 }
+#endif
 
 int
 nodeSetMemoryParameters(virConnectPtr conn ATTRIBUTE_UNUSED,
@@ -1014,6 +1016,7 @@ nodeSetMemoryParameters(virConnectPtr conn ATTRIBUTE_UNUSED,
 #endif
 }
 
+#ifdef __linux__
 static int
 nodeGetMemoryParameterValue(const char *field,
                             void *value)
@@ -1058,6 +1061,7 @@ cleanup:
     VIR_FREE(buf);
     return ret;
 }
+#endif
 
 #define NODE_MEMORY_PARAMETERS_NUM 7
 int