From f2179944cc66cf999c57a37c05fdd377340a50e3 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 29 Mar 2017 12:04:17 -0400 Subject: [PATCH] Patched to compile on some platforms. --- src/atomic/SDL_atomic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index 7b4865c834785..8ee867b14f71f 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -211,7 +211,8 @@ SDL_AtomicAdd(SDL_atomic_t *a, int v) int SDL_AtomicGet(SDL_atomic_t *a) { -#ifdef HAVE_GCC_ATOMICS +/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */ +#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST); #else int value; @@ -225,7 +226,8 @@ SDL_AtomicGet(SDL_atomic_t *a) void * SDL_AtomicGetPtr(void **a) { -#ifdef HAVE_GCC_ATOMICS +/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */ +#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) return __atomic_load_n(a, __ATOMIC_SEQ_CST); #else void *value;