From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:26 +0000 (-0700) Subject: Fix build breakage introduced in hostinfo hypervisor detection changes. X-Git-Tag: stable-10.2.0~332 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7cbc6d60863ef0b02f15814178ef2f318fcf697c;p=thirdparty%2Fopen-vm-tools.git Fix build breakage introduced in hostinfo hypervisor detection changes. ARM builds are breaking because Hostinfo_HypervisorPresent is defined but not used [-Werror=unused-function]. This change defines Hostinfo_HypervisorPresent only for i386 and x86_64 architectures. --- diff --git a/open-vm-tools/lib/misc/hostinfoHV.c b/open-vm-tools/lib/misc/hostinfoHV.c index 1c616d236..f388eccc7 100644 --- a/open-vm-tools/lib/misc/hostinfoHV.c +++ b/open-vm-tools/lib/misc/hostinfoHV.c @@ -53,20 +53,20 @@ *---------------------------------------------------------------------- */ +#if defined(__i386__) || defined(__x86_64__) static Bool Hostinfo_HypervisorPresent(void) { static Bool hypervisorPresent; -#if defined(__i386__) || defined(__x86_64__) CPUIDRegs regs; if (!hypervisorPresent) { __GET_CPUID(1, ®s); hypervisorPresent = CPUID_ISSET(1, ECX, HYPERVISOR, regs.ecx); } -#endif return hypervisorPresent; } +#endif /*