aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk-chan_sccp
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2019-05-31 07:44:49 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2019-05-31 07:44:49 +0000
commit31af72c31cde89897fbd0f6a4a6a1025c94f9433 (patch)
tree2182551ceb3a19071453ef20b6afc90451d02776 /net/asterisk-chan_sccp
parent8fffd8659613f71ee179e2ea94c4eb263511f7d0 (diff)
downloadports-31af72c31cde89897fbd0f6a4a6a1025c94f9433.tar.gz
ports-31af72c31cde89897fbd0f6a4a6a1025c94f9433.zip
Notes
Diffstat (limited to 'net/asterisk-chan_sccp')
-rw-r--r--net/asterisk-chan_sccp/files/patch-fix-new-asterisk-include85
1 files changed, 85 insertions, 0 deletions
diff --git a/net/asterisk-chan_sccp/files/patch-fix-new-asterisk-include b/net/asterisk-chan_sccp/files/patch-fix-new-asterisk-include
new file mode 100644
index 000000000000..b094ac722700
--- /dev/null
+++ b/net/asterisk-chan_sccp/files/patch-fix-new-asterisk-include
@@ -0,0 +1,85 @@
+From 9684efb7709c1be23c99f555f61b5a3ad15b0675 Mon Sep 17 00:00:00 2001
+From: Diederik de Groot <dkgroot@talon.nl>
+Date: Thu, 16 May 2019 17:48:55 +0200
+Subject: [PATCH] Add support for new asterisk mwi.h header file
+
+---
+ autoconf/asterisk.m4 | 6 ++++++
+ configure | 13 +++++++++++++
+ src/config.h.in | 3 +++
+ src/sccp_mwi.c | 4 ++++
+ 4 files changed, 26 insertions(+)
+
+diff --git a/autoconf/asterisk.m4 b/autoconf/asterisk.m4
+index 52c6ef70e..67969940a 100644
+--- autoconf/asterisk.m4
++++ autoconf/asterisk.m4
+@@ -1120,6 +1120,12 @@ dnl CFLAGS="${CFLAGS_saved} -Werror=implicit-function-declaration"
+ ],,[
+ $HEADER_INCLUDE
+ ])
++ AC_CHECK_HEADER([asterisk/mwi.h],
++ [
++ AC_DEFINE([HAVE_PBX_MWI_H],1,[Found 'asterisk/mwi.h'])
++ ],,[
++ $HEADER_INCLUDE
++ ])
+ AC_CHECK_HEADER([asterisk/utils.h],
+ [
+ AC_DEFINE([HAVE_PBX_UTILS_H],1,[Found 'asterisk/utils.h'])
+diff --git a/configure b/configure
+index 8cff697c7..182f27ac4 100755
+--- configure
++++ configure
+@@ -28852,6 +28852,19 @@ if test "x$ac_cv_header_asterisk_message_h" = xyes; then :
+ $as_echo "#define HAVE_PBX_MESSAGE_H 1" >>confdefs.h
+
+
++fi
++
++
++ ac_fn_c_check_header_compile "$LINENO" "asterisk/mwi.h" "ac_cv_header_asterisk_mwi_h" "
++ $HEADER_INCLUDE
++
++"
++if test "x$ac_cv_header_asterisk_mwi_h" = xyes; then :
++
++
++$as_echo "#define HAVE_PBX_MWI_H 1" >>confdefs.h
++
++
+ fi
+
+
+diff --git a/src/config.h.in b/src/config.h.in
+index e5ba1bfec..ad7d25efc 100644
+--- src/config.h.in
++++ src/config.h.in
+@@ -583,6 +583,9 @@
+ /* Found 'asterisk/message.h' */
+ #undef HAVE_PBX_MESSAGE_H
+
++/* Found 'asterisk/mwi.h' */
++#undef HAVE_PBX_MWI_H
++
+ /* Found 'asterisk/pbx.h' */
+ #undef HAVE_PBX_PBX_H
+
+diff --git a/src/sccp_mwi.c b/src/sccp_mwi.c
+index d21c43c7f..5238f506c 100644
+--- src/sccp_mwi.c
++++ src/sccp_mwi.c
+@@ -25,9 +25,13 @@ SCCP_FILE_VERSION(__FILE__, "");
+ #elif HAVE_PBX_STASIS_H
+ #include <asterisk/stasis.h>
+ #endif
++#ifdef HAVE_PBX_MWI_H // ast_mwi_state_type
++#include <asterisk/mwi.h>
++#else
+ #ifdef HAVE_PBX_APP_H // ast_mwi_state_type
+ #include <asterisk/app.h>
+ #endif
++#endif
+ #include <asterisk/cli.h>
+
+ pbx_mutex_t subscriptions_lock;