x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c utils.c utils.c: In function assert_dir: utils.c:103:21: error: PATH_MAX undeclared (first use in this function) 103 | char stampfname[PATH_MAX]; | ^~~~~~~~ utils.c:103:21: note: each undeclared identifier is reported only once for each function it appears in ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl-20200316-165821 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-9.3.0 * clang version 10.0.0 Target: x86_64-gentoo-linux-musl Thread model: posix InstalledDir: /usr/lib/llvm/10/bin /usr/lib/llvm/10 10.0.0 Available Python interpreters, in order of preference: [1] python3.8 [2] python3.7 [3] python3.6 [4] python2.7 (fallback) Available Ruby profiles: [1] ruby24 (with Rubygems) [2] ruby25 (with Rubygems) * Available Rust versions: [1] rust-1.41.1 * repository: ==> /var/db/repos/gentoo/metadata/timestamp.chk <== Wed, 18 Mar 2020 13:38:27 +0000 emerge -qpvO sys-apps/pmount [ebuild N ] sys-apps/pmount-0.9.99_alpha-r5 USE="crypt"
Created attachment 622450 [details] emerge-info.txt
Created attachment 622452 [details] emerge-history.txt
Created attachment 622454 [details] environment
Created attachment 622456 [details] etc.portage.tbz2
Created attachment 622458 [details] logs.tbz2
Created attachment 622460 [details] sys-apps:pmount-0.9.99_alpha-r5:20200319-052335.log
Created attachment 622462 [details] temp.tbz2
I suspect this is a case of a missing #include <limits.h> which is required explicitly on musl-libc.
Created attachment 787208 [details, diff] include <limits.h> for PATH_MAX definition This patch adds #include <limits.h> in the file src/utils.c, and allows pmount to compile with musl.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0773dc7048e4ce34e9d61c580a7424348f5124db commit 0773dc7048e4ce34e9d61c580a7424348f5124db Author: Cristian Othón Martínez Vera <cfuga@cfuga.mx> AuthorDate: 2022-06-25 03:44:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-25 03:44:00 +0000 sys-apps/pmount: fix build with musl Closes: https://bugs.gentoo.org/713422 Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx> Signed-off-by: Sam James <sam@gentoo.org> sys-apps/pmount/files/pmount-0.9.99_alpha-limits-musl.patch | 12 ++++++++++++ sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-)
Thanks! I went ahead and fixed some implicit function declarations in a follow up too (unrelated to your commit other than being similar in nature).