From 79f928492dba6a46c63e77d6b22c17c23e66403b Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 28 May 2018 13:33:32 +0200 Subject: build: Don't use locale funcs if locale_t is not defined in locale.h On macOS, locale_t is not defined in . Although it is defined in , we rather not use locales at all for POSIX compliance. --- common/compat.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/compat.h') diff --git a/common/compat.h b/common/compat.h index 96a731d..d78db0c 100644 --- a/common/compat.h +++ b/common/compat.h @@ -340,6 +340,12 @@ int fdwalk (int (* cb) (void *data, int fd), #endif +/* If either locale_t or newlocale() is not available, strerror_l() + * cannot be used */ +#if !defined(HAVE_LOCALE_T) || !defined(HAVE_NEWLOCALE) +#undef HAVE_STRERROR_L +#endif + int p11_ascii_tolower (int c); int p11_ascii_toupper (int c); -- cgit v1.1