aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk/musl-libcap.patch
blob: d7ce52e7be6b1504366d60e250ea9342f71cb08b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff -ru asterisk-12.4.0.orig/configure.ac asterisk-12.4.0/configure.ac
--- asterisk-12.4.0.orig/configure.ac	2014-08-06 09:07:19.000000000 -0300
+++ asterisk-12.4.0/configure.ac	2014-08-06 09:10:16.350632198 -0300
@@ -1259,9 +1259,11 @@
   AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_check_format], [bfd.h], [-ldl -liberty -lz])
 fi
 
-if test "x${OSARCH}" = "xlinux-gnu" ; then
+case "${OSARCH}" in
+linux*)
   AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
-fi
+  ;;
+esac
 
 AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])
 AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220])
diff -ru asterisk-12.4.0.orig/main/Makefile asterisk-12.4.0/main/Makefile
--- asterisk-12.4.0.orig/main/Makefile	2014-08-06 08:53:33.000000000 -0300
+++ asterisk-12.4.0/main/Makefile	2014-08-06 09:07:59.210630841 -0300
@@ -1,4 +1,3 @@
-#
 # Asterisk -- An open source telephony toolkit.
 #
 # Makefile to build main Asterisk binary
@@ -40,14 +39,12 @@
 AST_LIBS+=$(URIPARSER_LIB)
 AST_LIBS+=$(UUID_LIB)
 AST_LIBS+=$(CRYPT_LIB)
+AST_LIBS+=$(CAP_LIB)
 
 ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
   ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
   AST_LIBS+=-ldl
   endif
-  ifneq (x$(CAP_LIB),x)
-    AST_LIBS+=$(CAP_LIB)
-  endif
   AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv
 else
   AST_LIBS+=$(EDITLINE_LIB) -lm