From a7d44750af9a7c535ac4bf474d49a7cdc2aab415 Mon Sep 17 00:00:00 2001 From: "Igor V. Kovalenko" Date: Thu, 3 Jun 2021 09:43:10 +0300 Subject: [PATCH] build-sys: meson: restore big endian detection Autotools used AC_C_BIGENDIAN to set WORDS_BIGENDIAN, add Meson implementation. Part-of: --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 255c73a58..fdd8bf655 100644 --- a/meson.build +++ b/meson.build @@ -169,6 +169,10 @@ cdata.set('OS_IS_FREEBSD', 0) platform_socket_dep = [] platform_dep = [] +if host_machine.endian() == 'big' + cdata.set('WORDS_BIGENDIAN', 1) +endif + # FIXME: This was not tested. Maybe some flags should better be CFLAGS, # rather than ending up in the config.h file? if host_machine.system() == 'darwin'