trivial: Actually check if __get_cpuid_count exists before using cpuid.h

This commit is contained in:
Richard Hughes 2020-12-15 12:05:48 +00:00
parent 9619514508
commit f99dc76cfe

View File

@ -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')