From f99dc76cfebe12b63d032a344c7281d07c34317e Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 15 Dec 2020 12:05:48 +0000 Subject: [PATCH] trivial: Actually check if __get_cpuid_count exists before using cpuid.h --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7c16cd5f4..cdaee1879 100644 --- a/meson.build +++ b/meson.build @@ -290,7 +290,9 @@ endif if cc.has_header('fnmatch.h') conf.set('HAVE_FNMATCH_H', '1') endif -if cc.has_header('cpuid.h') and (host_cpu == 'x86' or host_cpu == 'x86_64') +if cc.has_header('cpuid.h') and \ + cc.has_header_symbol('cpuid.h', '__get_cpuid_count') and \ + (host_cpu == 'x86' or host_cpu == 'x86_64') conf.set('HAVE_CPUID_H', '1') else if get_option('plugin_msr')