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
This commit is contained in:
Konstantin Belousov
2025-07-09 01:34:28 +03:00
parent 8f0a6a9aad
commit e8019a1591
2 changed files with 20 additions and 0 deletions
@@ -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
@@ -0,0 +1,6 @@
#ifndef _SYS_EXTERRVAR_H_
#define _SYS_EXTERRVAR_H_
#define UEXTERROR_MAXLEN 256
#endif