From 23daee2fac87850ec9881a9911ad695e4c24f7aa Mon Sep 17 00:00:00 2001 From: Tom Hosking Date: Fri, 19 Jul 2019 12:03:45 +0100 Subject: [PATCH] Fix locale for MacOS --- libconfig/libconfig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libconfig/libconfig.c b/libconfig/libconfig.c index edf7b8b..d54efbc 100644 --- a/libconfig/libconfig.c +++ b/libconfig/libconfig.c @@ -31,7 +31,11 @@ #include "parsectx.h" #include "wincompat.h" +#ifdef __APPLE__ +#include +#else #include +#endif #ifdef HAVE_XLOCALE_H #include @@ -86,7 +90,6 @@ static void __config_locale_override(void) setlocale(LC_NUMERIC, "C"); #elif defined(__APPLE__) - locale_t loc = newlocale(LC_NUMERIC_MASK, "C", NULL); uselocale(loc);