From 2736a0c64e522b575ea0ada635e823f132fd7d51 Mon Sep 17 00:00:00 2001 From: asavah Date: Sat, 17 Dec 2022 17:00:56 +0100 Subject: meson: fix cross-compilation of LONG_MAX https://github.com/systemd/systemd/pull/25618#issuecomment-1355019553 --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 1ddb42993a..3c6734b578 100644 --- a/meson.build +++ b/meson.build @@ -510,7 +510,11 @@ conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include ')) conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include ')) conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('typeof(((struct timex *)0)->freq)', prefix : '#include ')) -long_max = cc.compute_int('LONG_MAX', prefix : '#include ') +long_max = cc.compute_int( + 'LONG_MAX', + prefix : '#include ', + guess : 0x7FFFFFFFFFFFFFFF, + high : 0x7FFFFFFFFFFFFFFF) assert(long_max > 100000) conf.set_quoted('LONG_MAX_STR', '@0@'.format(long_max)) -- cgit v1.2.1