The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8019a15918596d8c5e9d15378edf223caffda58
commit e8019a15918596d8c5e9d15378edf223caffda58 Author: Konstantin Belousov <k...@freebsd.org> AuthorDate: 2025-07-08 22:34:28 +0000 Commit: Konstantin Belousov <k...@freebsd.org> CommitDate: 2025-07-10 20:55:41 +0000 cross-build: provide exterr.h and sys/exterrvar.h for non-FreeBSD hosts with enough glue to make libc/gen/err.c compilable. Reported by: jhb Reviewed by: jhb, jrtc27 Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51217 --- tools/build/cross-build/include/common/exterr.h | 14 ++++++++++++++ tools/build/cross-build/include/common/sys/exterrvar.h | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/tools/build/cross-build/include/common/exterr.h b/tools/build/cross-build/include/common/exterr.h new file mode 100644 index 000000000000..62482841c7b2 --- /dev/null +++ b/tools/build/cross-build/include/common/exterr.h @@ -0,0 +1,14 @@ +#ifndef _EXTERR_H_ +#define _EXTERR_H_ + +#include <sys/types.h> + +static inline int +uexterr_gettext(char *buf, size_t bufsz) +{ + if (bufsz > 0) + buf[0] = '\0'; + return (0); +} + +#endif diff --git a/tools/build/cross-build/include/common/sys/exterrvar.h b/tools/build/cross-build/include/common/sys/exterrvar.h new file mode 100644 index 000000000000..0ba821aadef2 --- /dev/null +++ b/tools/build/cross-build/include/common/sys/exterrvar.h @@ -0,0 +1,6 @@ +#ifndef _SYS_EXTERRVAR_H_ +#define _SYS_EXTERRVAR_H_ + +#define UEXTERROR_MAXLEN 256 + +#endif