[PATCH 3/3] virhostcpu: Make only defined symbols available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That way you get the error from the compiler before the linker.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 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 a4ce655d6a2e..e9c22eecc9c9 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.12.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux