From: asavah Date: Sat, 17 Dec 2022 16:00:56 +0000 (+0100) Subject: meson: fix cross-compilation of LONG_MAX X-Git-Tag: v253-rc1~249 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2736a0c64e522b575ea0ada635e823f132fd7d51;p=thirdparty%2Fsystemd.git meson: fix cross-compilation of LONG_MAX https://github.com/systemd/systemd/pull/25618#issuecomment-1355019553 --- diff --git a/meson.build b/meson.build index 1ddb42993a0..3c6734b578f 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))