Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong limits.h include (should be linux/limits.h)
ARG_MAX and PATH_MAX are defined on POSIX.1-2017's limits.h(0p)[1], on linux/limits.h and on musl's limits.h, but not on glibc's limits.h (nor on any of its includes): $ grep -F -e ' ARG_MAX' -e ' PATH_MAX' /usr/include/limits.h \ /usr/include/linux/limits.h /usr/lib/musl/include/limits.h /usr/include/linux/limits.h:#define ARG_MAX 131072 /* # bytes of args + environ for exec() */ /usr/include/linux/limits.h:#define PATH_MAX 4096 /* # chars in a path name including nul */ /usr/lib/musl/include/limits.h:#define PATH_MAX 4096 /usr/lib/musl/include/limits.h:#define ARG_MAX 131072 Environment: $ grep '^NAME' /etc/os-release NAME="Artix Linux" $ pacman -Qo /usr/include/limits.h /usr/include/linux/limits.h \ /usr/lib/musl/include/limits.h /usr/include/limits.h is owned by glibc 2.33-5 /usr/include/linux/limits.h is owned by linux-api-headers 5.12.3-1 /usr/lib/musl/include/limits.h is owned by musl 1.2.2-1 Files that use the macros: $ git grep -Fl -e ARG_MAX -e PATH_MAX -- src src/firejail/cmdline.c src/firejail/firejail.h src/libtrace/libtrace.c src/libtracelog/libtracelog.c Note: No other macro from linux/limits.h appears to be used. Note2: The build works even without including any limits.h on the files that this commit changes, so there is probably another include on them that ends up defining ARG_MAX/PATH_MAX. Relates to #4578. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
- Loading branch information