]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
hostinfo.h: stop including x86cpuid.h
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:05 +0000 (12:11 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:05 +0000 (12:11 -0700)
With the removal of Hostinfo_GetAllCpuid in an earlier change, hostinfo.h
can stop including x86cpuid.h and only needs vendor IDs from x86vendor.h.

Unfortunately, quite a few source files depended in hostinfo.h's automatic
inclusion of x86cpuid.h. Fix them to include what they need.

The lib/include/guestStats.h is a special case that happened to succeed because
of a warning that was disabled in x86cpuid.h which also happens to have
been included earlier than this header.  Re-disable the warning.

open-vm-tools/lib/include/guestStats.h
open-vm-tools/lib/include/hostinfo.h
open-vm-tools/lib/vmCheck/vmcheck.c

index 4f5fa6d8813c6cd4bb7c8e3dda4c2b6b7df8cd62..a52df0c6ab9d66bc44f05f911cd35af7f36dae95 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2018,2020 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -121,6 +121,10 @@ struct GuestStatHeader {
 #include "vmware_pack_end.h"
 GuestStatHeader;
 
+#ifdef _MSC_VER
+#pragma warning (disable :4200) // non-std extension: zero-sized array in struct
+#endif
+
 typedef
 #include "vmware_pack_begin.h"
 struct GuestDatumHeader {
index 74142a204772392b3972238279bc70df889cc267..40552d0f98c8c0bc95e4c9d71c66a2464596d9bf 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "vm_basic_types.h"
 #include "vm_basic_defs.h"
-#include "x86cpuid.h"
+#include "x86vendor.h"
 #include "unicodeTypes.h"
 
 #if defined(__cplusplus)
index bd857b44de91ddbbfaa8f0717bd739fd10a0ecae..3277f0c4b58c95af50eaed5153e5591775200e72 100644 (file)
@@ -42,6 +42,7 @@
 #if !defined(WINNT_DDK)
 #  include "hostinfo.h"
 #  include "str.h"
+#  include "x86cpuid.h"
 #endif
 
 /*