diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-02-08 12:42:43 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-02-08 12:42:43 +0000 |
commit | 97bec22f7f0faa0832353188f285df056722d82c (patch) | |
tree | b09822562819c6bf8505c436416d6978b25a969e /xpp | |
parent | 464594813d247c3c0265df7c168cb9d9d0ccde23 (diff) |
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
Merged revisions 9426 via svnmerge from
http://svn.digium.com/svn/dahdi/tools/trunk
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.4@9736 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp')
-rw-r--r-- | xpp/astribank_is_starting.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |