[packages/asterisk/ASTERISK_1_8] - fix build

arekm arekm at pld-linux.org
Wed Dec 21 11:44:58 CET 2016


commit 9ea1ae67dcdf1da84192f62dbf022328deb3f155
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Dec 21 11:44:51 2016 +0100

    - fix build

 asterisk-build.patch | 36 ++++++++++++++++++++++++++++++++++++
 asterisk.spec        |  2 ++
 2 files changed, 38 insertions(+)
---
diff --git a/asterisk.spec b/asterisk.spec
index 73e2f16..677049b 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -72,6 +72,7 @@ Patch16:	lpc10-system.patch
 Patch17:	gsm-libpoison.patch
 Patch18:	Fix-history-loading-when-using-external-libedit.patch
 Patch19:	asterisk-osptoolkit.patch
+Patch20:	%{name}-build.patch
 URL:		http://www.asterisk.org/
 BuildRequires:	OSPToolkit-devel >= 4.0.0
 BuildRequires:	SDL_image-devel
@@ -560,6 +561,7 @@ cp %{SOURCE11} .
 %patch17 -p1
 %patch18 -p1
 %patch19 -p0
+%patch20 -p1
 
 # Fixup makefile so sound archives aren't downloaded/installed
 %{__sed} -i -e 's/^all:.*$/all:/' sounds/Makefile
diff --git a/asterisk-build.patch b/asterisk-build.patch
new file mode 100644
index 0000000..7e03971
--- /dev/null
+++ b/asterisk-build.patch
@@ -0,0 +1,36 @@
+--- asterisk-1.8.32.3/channels/chan_sip.c~	2014-10-30 02:57:11.000000000 +0100
++++ asterisk-1.8.32.3/channels/chan_sip.c	2016-12-21 11:27:11.044170760 +0100
+@@ -13667,11 +13667,12 @@ static int sip_reg_timeout(const void *d
+ 
+ static const char *sip_sanitized_host(const char *host)
+ {
+-	struct ast_sockaddr addr = { { 0, 0, }, };
++	struct ast_sockaddr addr;
+ 
+ 	/* peer/sip_pvt->tohost and sip_registry->hostname should never have a port
+ 	 * in them, so we use PARSE_PORT_FORBID here. If this lookup fails, we return
+ 	 * the original host which is most likely a host name and not an IP. */
++	memset(&addr, 0, sizeof(addr));
+ 	if (!ast_sockaddr_parse(&addr, host, PARSE_PORT_FORBID)) {
+ 		return host;
+ 	}
+--- asterisk-1.8.32.3/include/asterisk/inline_api.h~	2006-02-14 20:14:15.000000000 +0100
++++ asterisk-1.8.32.3/include/asterisk/inline_api.h	2016-12-21 11:31:38.490596742 +0100
+@@ -43,11 +43,15 @@
+   including the header file
+  */
+ 
+-#if !defined(LOW_MEMORY)
++#if !defined(LOW_MEMORY) && !defined(DISABLE_INLINE)
+ 
+ #if !defined(AST_API_MODULE)
++#if defined(__clang__) || defined(__GNUC_STDC_INLINE__)
++#define AST_INLINE_API(hdr, body) static hdr; static inline hdr body
++#else /* if defined(__clang__) */
+ #define AST_INLINE_API(hdr, body) hdr; extern inline hdr body
+-#else
++#endif
++#else /* if !defined(AST_API_MODULE) */
+ #define AST_INLINE_API(hdr, body) hdr; hdr body
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/asterisk.git/commitdiff/9ea1ae67dcdf1da84192f62dbf022328deb3f155



More information about the pld-cvs-commit mailing list