From: John Wolfe Date: Tue, 22 Sep 2020 21:54:06 +0000 (-0700) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-11.3.0~320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd53ce69a494ac0929523010f768a03e4cafec24;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/x86cpuid.h b/open-vm-tools/lib/include/x86cpuid.h index 17a46cb93..3b089ce0b 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -85,9 +85,14 @@ typedef union CPUIDRegsUnion { #pragma warning (disable :4100) // unreferenced parameters #endif -typedef -#include "vmware_pack_begin.h" -struct CPUIDReply { +#if defined VMKERNEL || (!defined(__FreeBSD__) && !defined(__sun__)) +/* + * FreeBSD and Solaris do not support pragma pack until gcc-4.6, + * but do not need these structures (which are part of vmmon). + * Vmkernel sets __FreeBSD__ for a few files. + */ +#pragma pack(push, 1) +typedef struct CPUIDReply { /* * Unique host logical CPU identifier. It does not change across queries, so * we use it to correlate the replies of multiple queries. @@ -95,20 +100,16 @@ struct CPUIDReply { uint64 tag; // OUT CPUIDRegs regs; // OUT -} -#include "vmware_pack_end.h" -CPUIDReply; +} CPUIDReply; -typedef -#include "vmware_pack_begin.h" -struct CPUIDQuery { +typedef struct CPUIDQuery { uint32 eax; // IN uint32 ecx; // IN uint32 numLogicalCPUs; // IN/OUT CPUIDReply logicalCPUs[0]; // OUT -} -#include "vmware_pack_end.h" -CPUIDQuery; +} CPUIDQuery; +#pragma pack(pop) +#endif /* * CPUID levels the monitor caches.