From 4786fd610362501c2f8c70fef1d8fb66efd0996c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 5 Jan 2021 14:14:39 -0800 Subject: main.c: construct a combination locale to add UTF-8. We need for newlocale(3) on macOS, despite it being in POSIX 2008's . musl apparently doesn't have , so that's another trick to teach to portability.h... --- lib/portability.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/portability.h') diff --git a/lib/portability.h b/lib/portability.h index 5886f63f..bbba12d8 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -208,12 +208,16 @@ ssize_t xattr_lset(const char*, const char*, const void*, size_t, int); ssize_t xattr_fset(int, const char*, const void*, size_t, int); #endif -// macOS doesn't have these functions, but we can fake them. #ifdef __APPLE__ +// macOS doesn't have these functions, but we can fake them. int mknodat(int, const char*, mode_t, dev_t); int posix_fallocate(int, off_t, off_t); + +// macOS keeps newlocale(3) in the non-POSIX rather than . +#include #endif + // Android is missing some headers and functions // "generated/config.h" is included first #if CFG_TOYBOX_SHADOW -- cgit v1.2.3