I've seen this a few times recently when building kernel on amd64 with TARGET_ARCH=i386: /usr/local/src/sys/compat/linux/linux_xattr.c:356:15: error: use of undeclared identifier 'SSIZE_MAX' I noticed that limits.h is explicitly included in several other sys/compat/linux/ c files. Explicitly including limits.h here as well does seem to resolve the build error, although I'm not sure if this breaks anything else. diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 9a206089ada1..608e70706a0b 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -30,6 +30,7 @@ #include <sys/extattr.h> #include <sys/fcntl.h> #include <sys/file.h> +#include <sys/limits.h> #include <sys/namei.h> #include <sys/proc.h> #include <sys/syscallsubr.h>
^Triage: note that this Problem Report contains an in-line patch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bcb471cfb499f61d98abdc7bfd48bee0e229b02b commit bcb471cfb499f61d98abdc7bfd48bee0e229b02b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-07-04 01:24:00 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-07-04 01:26:23 +0000 sys/systm.h: include sys/limits.h for SSIZE_MAX This makes the header more self-contained. The symbol is needed only on 32bit arches, but the include file is provided unconditionally to make the namespace population predictable. PR: 296489 Sponsored by: The FreeBSD Foundation MFC after: 1 week sys/sys/systm.h | 1 + 1 file changed, 1 insertion(+)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d1f7902fda830b38c6b0ca701b9e310aa3909228 commit d1f7902fda830b38c6b0ca701b9e310aa3909228 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-07-04 01:24:00 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-07-06 01:05:53 +0000 sys/systm.h: include sys/limits.h for SSIZE_MAX PR: 296489 (cherry picked from commit bcb471cfb499f61d98abdc7bfd48bee0e229b02b) sys/sys/systm.h | 1 + 1 file changed, 1 insertion(+)