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:
Tzafrir Cohen 2010-10-17 18:41:24 +00:00
parent e878bc06dc
commit 81205b90f7
4 changed files with 2533 additions and 3070 deletions

View File

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

5585
configure vendored

File diff suppressed because it is too large Load Diff

View File

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

View File

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