From 0fdf6c9db5114c77cd846c71699eb877d41ad6ae Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 2 Jul 2015 12:43:09 -0400 Subject: build: Mac OS X build issues, no spinlock, need sys_lgetxattr use regular locks, use our syscall wrappers in libglusterfs Change-Id: I7e0d00956366806af041b69b65d1f169aa0d2ae2 BUG: 1238793 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: http://review.gluster.org/11515 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Tested-by: NetBSD Build System --- libglusterfs/src/locking.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/locking.h b/libglusterfs/src/locking.h index a66cdc188db..24edf9aed44 100644 --- a/libglusterfs/src/locking.h +++ b/libglusterfs/src/locking.h @@ -12,6 +12,15 @@ #define _LOCKING_H #include +#ifdef GF_DARWIN_HOST_OS +#include +#define pthread_spinlock_t OSSpinLock +#define pthread_spin_lock(l) OSSpinLockLock(l) +#define pthread_spin_unlock(l) OSSpinLockUnlock(l) +#define pthread_spin_destroy(l) 0 +#define pthread_spin_init(l, v) (*l = v) +#endif + #if HAVE_SPINLOCK #define LOCK_INIT(x) pthread_spin_init (x, 0) -- cgit