asterisk-13.x: update source and fix build with musl
* update to version 13.4.0 * don't use GNU GLOB extensions in ael parser on musl Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
40d3a585a4
commit
90e88b24a7
4 changed files with 29 additions and 56 deletions
|
@ -9,12 +9,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=asterisk13
|
PKG_NAME:=asterisk13
|
||||||
PKG_VERSION:=13.2.0
|
PKG_VERSION:=13.4.0
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
|
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
|
||||||
PKG_MD5SUM:=36033a5faa2f0f9ac3bc34b799e823a2
|
PKG_MD5SUM:=8cd729d481f0b3d9aadcf5a607c25803
|
||||||
|
|
||||||
PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
|
PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
|
||||||
PKG_BUILD_DEPENDS:=libxml2/host
|
PKG_BUILD_DEPENDS:=libxml2/host
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
--- a/include/asterisk/lock.h
|
Index: asterisk-13.4.0/include/asterisk/lock.h
|
||||||
+++ b/include/asterisk/lock.h
|
===================================================================
|
||||||
|
--- asterisk-13.4.0.orig/include/asterisk/lock.h
|
||||||
|
+++ asterisk-13.4.0/include/asterisk/lock.h
|
||||||
@@ -51,9 +51,11 @@
|
@@ -51,9 +51,11 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -99,34 +101,3 @@
|
||||||
#define ast_suspend_lock_info(ignore);
|
#define ast_suspend_lock_info(ignore);
|
||||||
#define ast_restore_lock_info(ignore);
|
#define ast_restore_lock_info(ignore);
|
||||||
#endif /* !defined(LOW_MEMORY) */
|
#endif /* !defined(LOW_MEMORY) */
|
||||||
--- a/include/asterisk/utils.h
|
|
||||||
+++ b/include/asterisk/utils.h
|
|
||||||
@@ -25,7 +25,9 @@
|
|
||||||
|
|
||||||
#include "asterisk/network.h"
|
|
||||||
|
|
||||||
+#ifndef __UCLIBC__
|
|
||||||
#include <execinfo.h>
|
|
||||||
+#endif
|
|
||||||
#include <time.h> /* we want to override localtime_r */
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
@@ -514,13 +516,17 @@ extern void *_ast_mem_backtrace_buffer[_
|
|
||||||
* Ok, this sucks. But if we're already out of mem, we don't
|
|
||||||
* want the logger to create infinite recursion (and a crash).
|
|
||||||
*/
|
|
||||||
+#ifndef __UCLIBC__
|
|
||||||
#define MALLOC_FAILURE_MSG \
|
|
||||||
do { \
|
|
||||||
if (backtrace(_ast_mem_backtrace_buffer, _AST_MEM_BACKTRACE_BUFLEN) < _AST_MEM_BACKTRACE_BUFLEN) { \
|
|
||||||
ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
-
|
|
||||||
+#else
|
|
||||||
+#define MALLOC_FAILURE_MSG \
|
|
||||||
+ ast_log(LOG_ERROR, "Memory Allocation Failure (compiled without backtrace support)");
|
|
||||||
+#endif
|
|
||||||
/*!
|
|
||||||
* \brief A wrapper for malloc()
|
|
||||||
*
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
--- a/res/ael/ael.flex
|
||||||
|
+++ b/res/ael/ael.flex
|
||||||
|
@@ -595,7 +595,7 @@ includes { STORE_POS; return KW_INCLUDES
|
||||||
|
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||||
|
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||||
|
}
|
||||||
|
-#ifdef SOLARIS
|
||||||
|
+#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
|
||||||
|
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
|
||||||
|
#else
|
||||||
|
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
|
||||||
|
--- a/res/ael/ael_lex.c
|
||||||
|
+++ b/res/ael/ael_lex.c
|
||||||
|
@@ -1976,7 +1967,7 @@ YY_RULE_SETUP
|
||||||
|
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
|
||||||
|
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
|
||||||
|
}
|
||||||
|
-#ifdef SOLARIS
|
||||||
|
+#if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE) || defined(DEBUG_NONGNU)
|
||||||
|
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
|
||||||
|
#else
|
||||||
|
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
|
|
@ -1,20 +0,0 @@
|
||||||
--- a/main/tcptls.c
|
|
||||||
+++ b/main/tcptls.c
|
|
||||||
@@ -640,9 +640,15 @@
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, pos));
|
|
||||||
- ASN1_STRING_to_UTF8(&str2, str);
|
|
||||||
+ ret = ASN1_STRING_to_UTF8(&str2, str);
|
|
||||||
+ if (ret < 0) {
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (str2) {
|
|
||||||
- if (!strcasecmp(tcptls_session->parent->hostname, (char *) str2)) {
|
|
||||||
+ if (strlen((char *) str2) != ret) {
|
|
||||||
+ ast_log(LOG_WARNING, "Invalid certificate common name length (contains NULL bytes?)\n");
|
|
||||||
+ } else if (!strcasecmp(tcptls_session->parent->hostname, (char *) str2)) {
|
|
||||||
found = 1;
|
|
||||||
}
|
|
||||||
ast_debug(3, "SSL Common Name compare s1='%s' s2='%s'\n", tcptls_session->parent->hostname, str2);
|
|
Loading…
Reference in a new issue