浏览代码

Merge commit '98411c0d338933e75221cc9c25bf3d5b9ec977b9' into main

Sam Lantinga 3 年之前
父节点
当前提交
001969b324
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/atomic/SDL_spinlock.c

+ 4 - 0
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);