diff --git a/meson.build b/meson.build index 5eef2227e0f..341d9ae5b43 100644 --- a/meson.build +++ b/meson.build @@ -839,7 +839,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major') endif foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h'] - if cc.has_header(h) + if cc.compiles('#include <@0@>'.format(h), name : '@0@ works'.format(h)) pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify()) endif endforeach