From: Yu Watanabe Date: Mon, 9 Jun 2025 15:29:46 +0000 (+0900) Subject: musl: meson: explicitly set _LARGEFILE64_SOURCE X-Git-Tag: v259-rc1~84^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb33d20c072f2e7c3d500f00f8c04c99271f34c1;p=thirdparty%2Fsystemd.git musl: meson: explicitly set _LARGEFILE64_SOURCE glibc sets it when _GNU_SOURCE is defined, however, musl does not. Let's explicitly define it to make getdents64() and struct dirent64 available even when building with musl. --- diff --git a/meson.build b/meson.build index e3ee957fd5e..6d576b4d204 100644 --- a/meson.build +++ b/meson.build @@ -560,6 +560,10 @@ conf.set10('HAVE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT', have) conf.set('_GNU_SOURCE', 1) conf.set('__SANE_USERSPACE_TYPES__', true) +# glibc always defines _LARGEFILE64_SOURCE when _GNU_SOURCE is set, but musl does not do that, +# and it is necessary for making getdents64() and struct dirent64 exist. +conf.set('_LARGEFILE64_SOURCE', 1) + conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include ')) conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include ')) conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include '))