summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorasavah <asavah@avh.od.ua>2022-12-17 17:00:56 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2022-12-18 10:24:14 +0100
commit2736a0c64e522b575ea0ada635e823f132fd7d51 (patch)
tree04bb36332c3fb70fe6f902aa0a3d0e4059dfcfaa /meson.build
parentf12b399dd6362a03379cb769954ebfb9972236ed (diff)
downloadsystemd-2736a0c64e522b575ea0ada635e823f132fd7d51.tar.gz
meson: fix cross-compilation of LONG_MAX
https://github.com/systemd/systemd/pull/25618#issuecomment-1355019553
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
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 <sys/time.h>'))
conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('typeof(((struct timex *)0)->freq)', prefix : '#include <sys/timex.h>'))
-long_max = cc.compute_int('LONG_MAX', prefix : '#include <limits.h>')
+long_max = cc.compute_int(
+ 'LONG_MAX',
+ prefix : '#include <limits.h>',
+ guess : 0x7FFFFFFFFFFFFFFF,
+ high : 0x7FFFFFFFFFFFFFFF)
assert(long_max > 100000)
conf.set_quoted('LONG_MAX_STR', '@0@'.format(long_max))