Merge pull request #602 from neheb/a
authorJiri Slachta <jiri@slachta.eu>
Wed, 24 Feb 2021 22:37:23 +0000 (23:37 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Feb 2021 22:37:23 +0000 (23:37 +0100)
asterisk: fix compilation with 1.2.x

net/asterisk/Makefile
net/asterisk/patches/001-disable-semaphores-on-uclibc-otherwise-allow.patch
net/asterisk/patches/002-configure-fix-detection-of-re-entrant-resolver-funct.patch
net/asterisk/patches/130-eventfd.patch
net/asterisk/patches/140-use-default-lua.patch
net/asterisk/patches/150-musl-12x.patch [new file with mode: 0644]

index 8c21ce27c55252ae197720d8742970d8fe45d4d3..1cfaaa86479fe1c5f6031f6e3bf8409b58cd31f1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk
 PKG_VERSION:=18.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
index ad8bc59a0bdf6a59db208326ffc13bb7becbf54b..e925416ffffff1ae56498fe868d77aa599ae4ea7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1035,15 +1035,18 @@ AC_LINK_IFELSE(
+@@ -1037,15 +1037,18 @@ AC_LINK_IFELSE(
  
  # Some platforms define sem_init(), but only support sem_open(). joyous.
  AC_MSG_CHECKING(for working unnamed semaphores)
index 74ae60548928859a3d463c0973e180df4abc9a5d..fabf423df248765421b9e0fa5af50286dea6d42d 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1429,7 +1429,11 @@ AC_LINK_IFELSE(
+@@ -1431,7 +1431,11 @@ AC_LINK_IFELSE(
                        #include <arpa/nameser.h>
                        #endif
                        #include <resolv.h>],
index 75a0e70a0e1024283e4355de47771cdce724830f..ca5702123c7c5b1d5ad6d885ceac8cf3328d406c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1208,7 +1208,7 @@ if test "${ac_cv_have_variable_fdset}x"
+@@ -1210,7 +1210,7 @@ if test "${ac_cv_have_variable_fdset}x"
  fi
  
  AC_MSG_CHECKING([if we have usable eventfd support])
index 1dcbd05c5a05ab8ee0c2296614fb00201faa9c4e..52d024952652e338bc0fbf384d633fd41a93c675 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2560,7 +2560,11 @@ if test -z "$__opus_include" -o x"$__opu
+@@ -2564,7 +2564,11 @@ if test -z "$__opus_include" -o x"$__opu
  fi
  AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
  
diff --git a/net/asterisk/patches/150-musl-12x.patch b/net/asterisk/patches/150-musl-12x.patch
new file mode 100644 (file)
index 0000000..08441be
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/include/asterisk/compat.h
++++ b/include/asterisk/compat.h
+@@ -130,14 +130,16 @@ void timersub(struct timeval *tvend, str
+ #include <errno.h>
+-#ifdef SOLARIS
++#ifndef __BEGIN_DECLS
+ #define __BEGIN_DECLS
+ #define __END_DECLS
++#endif
+ #ifndef __P
+ #define __P(p) p
+ #endif
++#ifdef SOLARIS
+ #include <alloca.h>
+ #include <strings.h>
+ #include <pthread.h>
+--- a/utils/db1-ast/include/db.h
++++ b/utils/db1-ast/include/db.h
+@@ -68,8 +68,11 @@ typedef     unsigned long long      u_int64_t;
+ #endif /* __FreeBSD__ */
+ #endif
+-#ifdef SOLARIS
++#ifndef __P
+ #define       __P(p) p
++#endif
++
++#ifndef __BEGIN_DECLS
+ #define __BEGIN_DECLS
+ #define __END_DECLS
+ #endif