asterisk-chan-sccp: fix gcc8 compiles 425/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Wed, 8 May 2019 18:15:36 +0000 (20:15 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Wed, 8 May 2019 18:15:40 +0000 (20:15 +0200)
Patch applied upstream. Fixes compiles for arc targets, which already
use new gcc8 toolchain.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-chan-sccp/Makefile
net/asterisk-chan-sccp/patches/110-fix-compile-with-gcc8.patch [new file with mode: 0644]

index 13ec0369ea5194f851deb51ddec98ec97b678e0d..fb56b122bf5f4dd7ab6047392a14928372457a10 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chan-sccp
 PKG_VERSION:=v4.3.2-20190411
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/chan-sccp/chan-sccp.git
diff --git a/net/asterisk-chan-sccp/patches/110-fix-compile-with-gcc8.patch b/net/asterisk-chan-sccp/patches/110-fix-compile-with-gcc8.patch
new file mode 100644 (file)
index 0000000..aa25e08
--- /dev/null
@@ -0,0 +1,38 @@
+commit 1febe062d5ba93747ff8788ce0309c6174e3a08b
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date:   Mon May 6 21:07:48 2019 +0200
+
+    Add missing header to sccp_utils.c
+    
+    With newer gcc versions (8.3 tested) compile of sccp_utils.c fails with:
+    
+        CC       libsccp_la-sccp_utils.lo
+      sccp_utils.c: In function 'sccp_utf8_columnwidth':
+      sccp_utils.c:1846:2: warning: implicit declaration of function 'setlocale'; did you mean 'ast_setlocale'? [-Wimplicit-function-declaration]
+        setlocale(LC_ALL, "");
+        ^~~~~~~~~
+        ast_setlocale
+      sccp_utils.c:1846:12: error: 'LC_ALL' undeclared (first use in this function); did you mean 'AI_ALL'?
+        setlocale(LC_ALL, "");
+                  ^~~~~~
+                  AI_ALL
+      sccp_utils.c:1846:12: note: each undeclared identifier is reported only once for each function it appears in
+      Makefile:852: recipe for target 'libsccp_la-sccp_utils.lo' failed
+      make[7]: *** [libsccp_la-sccp_utils.lo] Error 1
+    
+    Fix this by adding the missing header.
+    
+    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+diff --git a/src/sccp_utils.c b/src/sccp_utils.c
+index df043d1a..f917c0c9 100644
+--- a/src/sccp_utils.c
++++ b/src/sccp_utils.c
+@@ -10,6 +10,7 @@
+  *
+  */
++#include <locale.h>
+ #include "config.h"
+ #include "common.h"
+ #include "sccp_channel.h"