From 71732f0f5420f981042ff56ccb2c653b95e3b954 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Mon, 27 Mar 2017 16:15:45 +0200 Subject: [PATCH] virhostcpu: Make only defined symbols available That way you get the error from the compiler before the linker. Signed-off-by: Martin Kletzander --- src/util/virhostcpu.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h index a4ce655d6a..e9c22eecc9 100644 --- a/src/util/virhostcpu.h +++ b/src/util/virhostcpu.h @@ -57,10 +57,13 @@ int virHostCPUStatsAssign(virNodeCPUStatsPtr param, const char *name, unsigned long long value); +# ifdef __linux__ int virHostCPUGetSocket(unsigned int cpu, unsigned int *socket); int virHostCPUGetCore(unsigned int cpu, unsigned int *core); -int virHostCPUGetOnline(unsigned int cpu, bool *online); virBitmapPtr virHostCPUGetSiblingsList(unsigned int cpu); +# endif + +int virHostCPUGetOnline(unsigned int cpu, bool *online); #endif /* __VIR_HOSTCPU_H__*/ -- 2.47.2