From f0fd940f580d259da24bcd1e4923485263ed9194 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 6 May 2018 09:01:34 +0200
Subject: don't use -Werror, fix missing locale_t


diff --git a/include/NASPRO/core/locale.h b/include/NASPRO/core/locale.h
index 1e84585..d9de2b4 100644
--- a/include/NASPRO/core/locale.h
+++ b/include/NASPRO/core/locale.h
@@ -100,7 +100,29 @@ NACORE_BEGIN_C_DECLS
  */
 
 /* Don't mess with this stuff!!! */
-#ifdef _WIN32
+#  define LC_ALL_MASK      0
+#  define LC_NUMERIC_MASK  0
+#  define LC_MESSAGES_MASK 0
+#  define LC_GLOBAL_LOCALE ((locale_t)(uintptr_t)1)
+typedef void *locale_t;
+
+static inline void freelocale(locale_t loc)
+{
+    (void)loc;
+}
+static inline locale_t newlocale(int mask, const char * locale, locale_t base)
+{
+    (void)mask; (void)locale; (void)base;
+    return NULL;
+}
+
+static inline locale_t uselocale(locale_t loc)
+{
+    (void)loc;
+    return NULL;
+}
+
+#if defined (_WIN32) || defined (__HAIKU__)
 
 typedef char *nacore_locale;
 
diff --git a/src/posix/Makefile.am b/src/posix/Makefile.am
index 82c70ab..9b436f5 100644
--- a/src/posix/Makefile.am
+++ b/src/posix/Makefile.am
@@ -8,7 +8,7 @@
 #
 
 if !WIN32
-AM_CFLAGS = -pedantic -Wall -Werror @THREAD_FLAGS@
+AM_CFLAGS = -pedantic -Wall @THREAD_FLAGS@
 AM_LDFLAGS = -no-undefined -version-info @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ \
 	     @THREAD_FLAGS@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
diff --git a/src/posix/Makefile.in b/src/posix/Makefile.in
index ae2c053..d9abcf7 100644
--- a/src/posix/Makefile.in
+++ b/src/posix/Makefile.in
@@ -295,7 +295,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-@WIN32_FALSE@AM_CFLAGS = -pedantic -Wall -Werror @THREAD_FLAGS@
+@WIN32_FALSE@AM_CFLAGS = -pedantic -Wall @THREAD_FLAGS@
 @WIN32_FALSE@AM_LDFLAGS = -no-undefined -version-info @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ \
 @WIN32_FALSE@	     @THREAD_FLAGS@
 
-- 
2.16.2

