aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@gmail.com>2018-03-18 11:49:40 -0700
committerMarat Dukhan <maratek@gmail.com>2018-03-18 11:49:40 -0700
commit706fea3acb8e6a3460bc53a4d6168e3cbf0b141a (patch)
tree534700f23f16155fdfcb1bbf8174888c0c22be2e
parent3060160e1e99c9c8429b3e304d89fc23e58b1d74 (diff)
downloadcpuinfo-706fea3acb8e6a3460bc53a4d6168e3cbf0b141a.tar.gz
Fix compilation issues on Windows
-rw-r--r--src/x86/windows/init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/x86/windows/init.c b/src/x86/windows/init.c
index 966cddb..3186a21 100644
--- a/src/x86/windows/init.c
+++ b/src/x86/windows/init.c
@@ -350,13 +350,16 @@ BOOL CALLBACK cpuinfo_x86_windows_init(PINIT_ONCE init_once, PVOID parameter, PV
}
for (uint32_t i = 0; i < packages_count; i++) {
- cluster->package = packages + i;
+ struct cpuinfo_package* package = packages + i;
+ struct cpuinfo_cluster* cluster = clusters + i;
+
+ cluster->package = package;
cluster->vendor = cores[cluster->core_start].vendor;
cluster->uarch = cores[cluster->core_start].uarch;
cluster->cpuid = cores[cluster->core_start].cpuid;
package->cluster_start = i;
package->cluster_count = 1;
- cpuinfo_x86_format_package_name(x86_processor.vendor, brand_string, packages[i].name);
+ cpuinfo_x86_format_package_name(x86_processor.vendor, brand_string, package->name);
}
/* Count caches */