From fb84eff448f5034347d6fab42781dc9fb6b9d91c Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 17 Oct 2010 18:41:24 +0000 Subject: 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.asterisk.org/svn/dahdi/tools/trunk@9426 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/astribank_is_starting.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xpp/astribank_is_starting.c') diff --git a/xpp/astribank_is_starting.c b/xpp/astribank_is_starting.c index 2ae1f73..d7661fe 100644 --- a/xpp/astribank_is_starting.c +++ b/xpp/astribank_is_starting.c @@ -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) { -- cgit v1.2.3