asterisk-16.x: disable semaphores only on uClibc 423/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Wed, 1 May 2019 18:43:34 +0000 (20:43 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Wed, 1 May 2019 18:52:08 +0000 (20:52 +0200)
The current patch disables semaphore use always. But musl and glibc
support semaphores. Only uClibc doesn't support them (the functions are
defined but just throw an error when called).

The patch is updated to allow Asterisk to use the system semaphores when
using anything but uClibc. It is also renamed to reflect that.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-16.x/Makefile
net/asterisk-16.x/patches/001-disable-semaphores-check.patch [deleted file]
net/asterisk-16.x/patches/001-disable-semaphores-on-uclibc-otherwise-allow.patch [new file with mode: 0644]
net/asterisk-16.x/patches/002-configure-fix-detection-of-re-entrant-resolver-funct.patch
net/asterisk-16.x/patches/130-eventfd.patch

index d7a74be99b555686ce66fd085555b4e7c542fbcf..92f68f719952f245fa03bffb7170a9ddb5b207dc 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 AST_MAJOR_VERSION:=16
 PKG_NAME:=asterisk$(AST_MAJOR_VERSION)
 PKG_VERSION:=$(AST_MAJOR_VERSION).3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
diff --git a/net/asterisk-16.x/patches/001-disable-semaphores-check.patch b/net/asterisk-16.x/patches/001-disable-semaphores-check.patch
deleted file mode 100644 (file)
index 8249342..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1016,19 +1016,6 @@ AC_LINK_IFELSE(
-   ]
- )
--# Some platforms define sem_init(), but only support sem_open(). joyous.
--AC_MSG_CHECKING(for working unnamed semaphores)
--AC_RUN_IFELSE(
--      [AC_LANG_PROGRAM([#include <semaphore.h>],
--              [sem_t sem; return sem_init(&sem, 0, 0);])],
--      AC_MSG_RESULT(yes)
--      AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
--      AC_MSG_RESULT(no),
--      AC_MSG_RESULT(cross-compile)
--      AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
--      AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
--)
--
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- if test "${ac_cv_pthread_rwlock_timedwrlock}" = "yes"; then
diff --git a/net/asterisk-16.x/patches/001-disable-semaphores-on-uclibc-otherwise-allow.patch b/net/asterisk-16.x/patches/001-disable-semaphores-on-uclibc-otherwise-allow.patch
new file mode 100644 (file)
index 0000000..7485608
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1018,15 +1018,18 @@ AC_LINK_IFELSE(
+ # Some platforms define sem_init(), but only support sem_open(). joyous.
+ AC_MSG_CHECKING(for working unnamed semaphores)
+-AC_RUN_IFELSE(
+-      [AC_LANG_PROGRAM([#include <semaphore.h>],
+-              [sem_t sem; return sem_init(&sem, 0, 0);])],
++AC_LINK_IFELSE(
++      [AC_LANG_PROGRAM(
++        [#include <semaphore.h>],
++        [#if defined(__UCLIBC__)
++         i_dont_exist sem;
++         #else
++         sem_t sem;
++         #endif
++         return sem_init(&sem, 0, 0);])],
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
+-      AC_MSG_RESULT(no),
+-      AC_MSG_RESULT(cross-compile)
+-      AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
+-      AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
++      AC_MSG_RESULT(no)
+ )
+ LIBS="$save_LIBS"
index 7eda9a6a1733aed9063b4d544aa6403e2c242ea7..e35ef4c86f0ece5f8c56d6c434156d7b1cb79bc6 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1396,7 +1396,11 @@ AC_LINK_IFELSE(
+@@ -1412,7 +1412,11 @@ AC_LINK_IFELSE(
                        #include <arpa/nameser.h>
                        #endif
                        #include <resolv.h>],
index f72704f52fe5565b55f4110989d7af5a33ac51ef..c783a52a87e8a4c24628085fe7aadbfc8e13ab97 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1189,7 +1189,7 @@ if test "${ac_cv_have_variable_fdset}x"
+@@ -1205,7 +1205,7 @@ if test "${ac_cv_have_variable_fdset}x"
  fi
  
  AC_MSG_CHECKING([if we have usable eventfd support])