diff options
author | Martin Willi <martin@revosec.ch> | 2013-04-11 19:20:33 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-05-06 16:06:48 +0200 |
commit | b0ccd14f2aa4e65d43e5c94ecdd296b1ad213bb1 (patch) | |
tree | fee6915da1a5fd62b007de686024bd211fc0d6da /src | |
parent | 0c586c00998f26018dabe202a9b262d7bb69ebc3 (diff) | |
download | strongswan-b0ccd14f2aa4e65d43e5c94ecdd296b1ad213bb1.tar.bz2 strongswan-b0ccd14f2aa4e65d43e5c94ecdd296b1ad213bb1.tar.xz |
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().
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/threading/semaphore.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/threading/semaphore.h b/src/libstrongswan/threading/semaphore.h index cdb0a6f19..34d814971 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; /** |