Commit 001969b324c6fadd3b980878b4b5dba4ba915abd

Sam Lantinga 2022-07-05T21:41:32

Merge commit '98411c0d338933e75221cc9c25bf3d5b9ec977b9' into main

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index 53776d5..cbe5445 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -44,6 +44,10 @@
 #include <kernel.h>
 #endif
 
+#if !defined(HAVE_GCC_ATOMICS) && defined(__MACOSX__)
+#include <libkern/OSAtomic.h>
+#endif
+
 #if defined(__WATCOMC__) && defined(__386__)
 SDL_COMPILE_TIME_ASSERT(locksize, 4==sizeof(SDL_SpinLock));
 extern __inline int _SDL_xchg_watcom(volatile int *a, int v);