asterisk-16.x: disable semaphores only on uClibc
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>
This commit is contained in:
parent
5d9b1156cf
commit
63a8ad1755
5 changed files with 31 additions and 25 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
AST_MAJOR_VERSION:=16
|
AST_MAJOR_VERSION:=16
|
||||||
PKG_NAME:=asterisk$(AST_MAJOR_VERSION)
|
PKG_NAME:=asterisk$(AST_MAJOR_VERSION)
|
||||||
PKG_VERSION:=$(AST_MAJOR_VERSION).3.0
|
PKG_VERSION:=$(AST_MAJOR_VERSION).3.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
|
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
|
||||||
|
|
|
@ -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
|
|
|
@ -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"
|
|
@ -18,7 +18,7 @@ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
|
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -1396,7 +1396,11 @@ AC_LINK_IFELSE(
|
@@ -1412,7 +1412,11 @@ AC_LINK_IFELSE(
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
#endif
|
#endif
|
||||||
#include <resolv.h>],
|
#include <resolv.h>],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/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
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we have usable eventfd support])
|
AC_MSG_CHECKING([if we have usable eventfd support])
|
||||||
|
|
Loading…
Reference in a new issue