]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix build breakage introduced in hostinfo hypervisor detection changes.
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:26 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:26 +0000 (11:23 -0700)
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.

open-vm-tools/lib/misc/hostinfoHV.c

index 1c616d236967b2623442cd4a51a60dbff59faa0b..f388eccc7a3127e5fc51f22013ce4cb60021d1c7 100644 (file)
  *----------------------------------------------------------------------
  */
 
+#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, &regs);
       hypervisorPresent = CPUID_ISSET(1, ECX, HYPERVISOR, regs.ecx);
    }
-#endif
    return hypervisorPresent;
 }
+#endif
 
 
 /*