From: Martin Willi Date: Thu, 11 Apr 2013 17:20:33 +0000 (+0200) Subject: semaphore: similar to thread_create(), semaphore_create() is used by Mach X-Git-Tag: 5.1.0dr1~153^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ccd14f2aa4e65d43e5c94ecdd296b1ad213bb1;p=thirdparty%2Fstrongswan.git semaphore: similar to thread_create(), semaphore_create() is used by Mach The compiler spits no warning, but the wrong symbol is used when calling semaphore_create() from strongSwan. Override the name with a #define to force the use of our semaphore_create(). --- diff --git a/src/libstrongswan/threading/semaphore.h b/src/libstrongswan/threading/semaphore.h index cdb0a6f191..34d814971c 100644 --- a/src/libstrongswan/threading/semaphore.h +++ b/src/libstrongswan/threading/semaphore.h @@ -21,6 +21,11 @@ #ifndef THREADING_SEMAPHORE_H_ #define THREADING_SEMAPHORE_H_ +#ifdef __APPLE__ +/* Mach uses a semaphore_create() call, use a different name for ours */ +#define semaphore_create(x) strongswan_semaphore_create(x) +#endif /* __APPLE__ */ + typedef struct semaphore_t semaphore_t; /**