freeswitch-stable: fix incompatible pointer type 339/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Thu, 21 Jun 2018 19:09:49 +0000 (21:09 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Thu, 21 Jun 2018 19:09:54 +0000 (21:09 +0200)
Currently compiles fail with:

  CC       libfreeswitch_la-switch_regex.lo
src/switch_regex.c: In function 'switch_regex_compile':
src/switch_regex.c:40:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
  return pcre_compile(pattern, options, errorptr, erroroffset, tables);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:2100: recipe for target 'libfreeswitch_la-switch_regex.lo' failed
make[5]: *** [libfreeswitch_la-switch_regex.lo] Error 1

Fix cherry-picked from upstream.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/freeswitch-stable/Makefile
net/freeswitch-stable/patches/350-fix-pcre-pointer-type.patch [new file with mode: 0644]

index e3258c34275a15f15d5c04757436674e4c2e9c28..be3b6bfb02cc94c9dda01872638cc4014c759905 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PRG_NAME:=freeswitch
 PKG_NAME:=$(PRG_NAME)-stable
 PKG_VERSION:=1.6.20
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
 
 PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
diff --git a/net/freeswitch-stable/patches/350-fix-pcre-pointer-type.patch b/net/freeswitch-stable/patches/350-fix-pcre-pointer-type.patch
new file mode 100644 (file)
index 0000000..dbbd0ff
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/switch_regex.c
++++ b/src/switch_regex.c
+@@ -37,7 +37,7 @@ SWITCH_DECLARE(switch_regex_t *) switch_
+                                                                                                         int options, const char **errorptr, int *erroroffset, const unsigned char *tables)
+ {
+-      return pcre_compile(pattern, options, errorptr, erroroffset, tables);
++      return (switch_regex_t *)pcre_compile(pattern, options, errorptr, erroroffset, tables);
+ }