From 17936e0b03b807a349ab86ffed10222c17aa30df Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 31 Jan 2012 03:04:47 +0000 Subject: Fix ZixSem compilation on Mac OS X. git-svn-id: http://svn.drobilla.net/zix/trunk@47 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- zix/sem.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'zix') diff --git a/zix/sem.h b/zix/sem.h index 6b66a51..0830c53 100644 --- a/zix/sem.h +++ b/zix/sem.h @@ -101,19 +101,20 @@ struct ZixSemImpl { static inline ZixStatus zix_sem_init(ZixSem* sem, unsigned initial) { - MPCreateSemaphore(UINT_MAX, initial, &_sem); + return MPCreateSemaphore(UINT_MAX, initial, &sem->sem) + ? ZIX_STATUS_SUCCESS : ZIX_STATUS_ERROR; } static inline void zix_sem_destroy(ZixSem* sem) { - MPDeleteSemaphore(_sem); + MPDeleteSemaphore(sem->sem); } static inline void zix_sem_post(ZixSem* sem) { - MPSignalSemaphore(_sem); + MPSignalSemaphore(sem->sem); } static inline void -- cgit v1.2.1