On 05/11/2025 03:59, Collin Funk wrote:
Hi Po,
Po Lu <[email protected]> writes:
`cgroup2_mount' in the nproc module expects `setmntent' to be present
whenever mntent.h is available, but the header itself does not define
`setmntent' on releases predating SDK 21, yielding such an error when
compiling Emacs:
nproc.c:391:15: error: implicit declaration of function 'setmntent' is invalid
in C99 [-Werror,-Wimplicit-function-declaration]
if (! (fp = setmntent ("/proc/mounts", "r")))
^
Interesting. I cannot reproduce with:
$ gnulib-tool --create-testdir --dir testdir1 nproc
$ cd testdir1
$ ./configure CC='cc -target aarch64-unknown-linux-android16'
Can you check if the attached patch fixes it for you?
That should work. I'll include that for the upcoming coreutils 9.9 release
with a build related item in NEWS.
Also related to this is Bruno's 2019 change at:
https://github.com/coreutils/gnulib/commit/a3d1c784993
cheers,
Padraig