diff options
author | asavah <asavah@avh.od.ua> | 2022-12-17 17:00:56 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-12-18 10:24:14 +0100 |
commit | 2736a0c64e522b575ea0ada635e823f132fd7d51 (patch) | |
tree | 04bb36332c3fb70fe6f902aa0a3d0e4059dfcfaa /meson.build | |
parent | f12b399dd6362a03379cb769954ebfb9972236ed (diff) | |
download | systemd-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.build | 6 |
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)) |