Re: [BUG] Kannel crashes on MacOS X
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Andreas Fink wrote: Hi Andreas, Darwin doesn't implement 'sem_init' (see gwlib/sempahore.c). On Darwin 'sem_open' should be used... as long it's not implemented, please try with attached patch... > Hi folks, > > I've checked out the latest CVS and tried to test it. > It fails on MacOS X 10.3.5 with the following error: > > 2004-08-16 12:44:00 [5023] [6] DEBUG: Started thread 10 > (gw/bb_boxc.c:function) > 2004-08-16 12:44:00 [5023] [10] DEBUG: Thread 10 > (gw/bb_boxc.c:function) maps to pid 5023. > 2004-08-16 12:44:00 [5023] [10] INFO: Client connected from <127.0.0.1> > 2004-08-16 12:44:00 [5023] [10] PANIC: Couldnot initialize semaphore. > 2004-08-16 12:44:00 [5023] [10] PANIC: System error 78: Function not > implemented > > Anyone having an idea what this is for? Kannel worked fine for ages on > MacOS X so this is something new being added recently. > The error happens at the time smsbox is connecting to bearerbox (the > crash is in bearerbox) > > The error is independent of the fact if HAVE_SEMAPHORE_H is 1 or 0. > > > Andreas Fink > Global Networks Switzerland AG > > ------------------------------------------------------------------ > Tel: +41-61-6666330 Fax: +41-61-6666334 Mobile: +41-79-2457333 > Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland > Web: http://www.global-networks.ch/Â [email protected] > ------------------------------------------------------------------ > PGP Fingerprint: B982 00B7 FFB5 0B33 BFF8 0F77 1E23 F3CA B4A3 D0B8 -- Thanks, Alex
darwin-sem.diff
(text/x-diff, 467 B)
Index: gwlib/semaphore.c =================================================================== RCS file: /home/cvs/gateway/gwlib/semaphore.c,v retrieving revision 1.5 diff -a -u -p -r1.5 semaphore.c --- gwlib/semaphore.c 28 Jun 2004 09:53:38 -0000 1.5 +++ gwlib/semaphore.c 16 Aug 2004 13:04:03 -0000 @@ -64,6 +64,10 @@ #include "gwlib/gwlib.h" +#ifdef DARWIN +#undef HAVE_SEMAPHORE_H +#endif + #ifdef HAVE_SEMAPHORE_H #include <semaphore.h> #include <errno.h>