Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- configure | 18 ------------------ meson.build | 6 ++++++ 2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/configure b/configure index 3e94ec0bd2..dd6098e306 100755 --- a/configure +++ b/configure @@ -4392,20 +4392,6 @@ then fi -########################################## -# check for _Static_assert() - -have_static_assert=no -cat > $TMPC << EOF -_Static_assert(1, "success"); -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - have_static_assert=yes -fi - ########################################## # checks for sanitizers @@ -5128,10 +5114,6 @@ if test "$have_af_vsock" = "yes" ; then echo "CONFIG_AF_VSOCK=y" >> $config_host_mak fi -if test "$have_static_assert" = "yes" ; then - echo "CONFIG_STATIC_ASSERT=y" >> $config_host_mak -fi - if test "$debug_mutex" = "yes" ; then echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 0b9dac5546..4b9bbca7ff 100644 --- a/meson.build +++ b/meson.build @@ -1318,6 +1318,12 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', config_host_data.set('HAVE_UTMPX', cc.has_header_symbol('utmpx.h', 'struct utmpx')) +config_host_data.set('CONFIG_STATIC_ASSERT', cc.compiles(''' + _Static_assert(1, "success"); + int main(void) { + return 0; + }''')) + # Some versions of Mac OS X incorrectly define SIZE_MAX config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' #include <stdint.h> -- 2.31.1