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/test-message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/test-message.c') diff --git a/common/test-message.c b/common/test-message.c index 339ad4b..5f0fce4 100644 --- a/common/test-message.c +++ b/common/test-message.c @@ -44,7 +44,7 @@ #include #include -#ifdef HAVE_LOCALE_H +#ifdef HAVE_STRERROR_L extern locale_t p11_message_locale; #endif @@ -54,7 +54,7 @@ test_with_err (void) const char *last; char *expected; -#ifdef HAVE_NEWLOCALE +#ifdef HAVE_STRERROR_L p11_message_locale = newlocale (LC_ALL_MASK, "POSIX", (locale_t) 0); #endif @@ -67,7 +67,7 @@ test_with_err (void) assert_str_eq (expected, last); free (expected); -#ifdef HAVE_NEWLOCALE +#ifdef HAVE_STRERROR_L freelocale (p11_message_locale); #endif } -- cgit v1.1