asterisk-1.8.x: fix build with musl
authorDaniel Golle <daniel@makrotopia.org>
Fri, 19 Jun 2015 05:09:24 +0000 (07:09 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 19 Jun 2015 06:02:31 +0000 (08:02 +0200)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch [new file with mode: 0644]

diff --git a/net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch b/net/asterisk-1.8.x/patches/030-GNU-GLOB-exts-only-on-glibc.patch
new file mode 100644 (file)
index 0000000..739a939
--- /dev/null
@@ -0,0 +1,26 @@
+Index: asterisk-1.8.32.3/res/ael/ael.flex
+===================================================================
+--- asterisk-1.8.32.3.orig/res/ael/ael.flex
++++ asterisk-1.8.32.3/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);
+Index: asterisk-1.8.32.3/res/ael/ael_lex.c
+===================================================================
+--- asterisk-1.8.32.3.orig/res/ael/ael_lex.c
++++ asterisk-1.8.32.3/res/ael/ael_lex.c
+@@ -1966,7 +1966,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);