]> xenbits.xensource.com Git - libvirt.git/commitdiff
virhostcpu: Make only defined symbols available
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 27 Mar 2017 14:15:45 +0000 (16:15 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 27 Mar 2017 15:34:59 +0000 (17:34 +0200)
That way you get the error from the compiler before the linker.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virhostcpu.h

index a4ce655d6a2e44ac3abc984f830b67c56b6c50f1..e9c22eecc9c93275ce27922a723626a5158672a6 100644 (file)
@@ -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__*/