Merge pull request #423 from micmac1/ast16-semaphores

asterisk-16.x: disable semaphores only on uClibc
This commit is contained in:
Jiri Slachta 2019-05-04 07:47:50 +02:00 committed by GitHub
commit b28098eae8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 25 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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>],

View file

@ -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])