astribank_is_starting: use semop if no semtimedop
astribank_is_starting should use a timeout for the semaphore, but if the GNU-specific semtimedop() is not available, we'll just fall back to using semop with no time out. Not as good, but better than nothing. (closes issue #16783) Reported by: abelbeck git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9426 17933a7a-c749-41c5-a318-cba88f637d49
This commit is contained in:
parent
e878bc06dc
commit
81205b90f7
@ -3,6 +3,12 @@
|
||||
/* Define if your system has the DAHDI headers. */
|
||||
#undef HAVE_DAHDI
|
||||
|
||||
/* Define if your system has the DAHDI23 headers. */
|
||||
#undef HAVE_DAHDI23
|
||||
|
||||
/* Define DAHDI23 headers version */
|
||||
#undef HAVE_DAHDI23_VERSION
|
||||
|
||||
/* Define DAHDI headers version */
|
||||
#undef HAVE_DAHDI_VERSION
|
||||
|
||||
@ -21,6 +27,9 @@
|
||||
/* Define to indicate the ${NEWT_DESCRIP} library version */
|
||||
#undef HAVE_NEWT_VERSION
|
||||
|
||||
/* Define to 1 if you have the `semtimedop' function. */
|
||||
#undef HAVE_SEMTIMEDOP
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@ -63,6 +72,9 @@
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
@ -99,6 +99,8 @@ AST_C_DEFINE_CHECK([DAHDI23], [DAHDI_CONFIG_NTTE], [dahdi/user.h])
|
||||
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
|
||||
AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h])
|
||||
|
||||
AC_CHECK_FUNCS([semtimedop])
|
||||
|
||||
PBX_HDLC=0
|
||||
AC_MSG_CHECKING([for GENERIC_HDLC_VERSION version 4 in linux/hdlc.h])
|
||||
AC_COMPILE_IFELSE(
|
||||
|
@ -15,6 +15,10 @@ static int debug;
|
||||
static int verbose;
|
||||
static int timeout_seconds = 60;
|
||||
|
||||
/* If libc provides no timeout variant: try to do without it: */
|
||||
#ifndef HAVE_SEMTIMEDEOP
|
||||
#define semtimedop(sem, ops, n, timeout) semop(sem, ops, n)
|
||||
#endif
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user