diff --git a/lib/mesa/src/util/u_atomic.c b/lib/mesa/src/util/u_atomic.c index a7ff22c56..2684e8e3a 100644 --- a/lib/mesa/src/util/u_atomic.c +++ b/lib/mesa/src/util/u_atomic.c @@ -163,10 +163,13 @@ __sync_val_compare_and_swap_4(uint32_t *ptr, uint32_t oldval, uint32_t newval) #pragma redefine_extname __sync_sub_and_fetch_8_c __sync_sub_and_fetch_8 #pragma redefine_extname __sync_fetch_and_add_8_c __sync_fetch_and_add_8 #pragma redefine_extname __sync_fetch_and_sub_8_c __sync_fetch_and_sub_8 +#pragma redefine_extname __sync_val_compare_and_swap_8_c \ + __sync_val_compare_and_swap_8 #define __sync_add_and_fetch_8 __sync_add_and_fetch_8_c #define __sync_sub_and_fetch_8 __sync_sub_and_fetch_8_c #define __sync_fetch_and_add_8 __sync_fetch_and_add_8_c #define __sync_fetch_and_sub_8 __sync_fetch_and_sub_8_c +#define __sync_val_compare_and_swap_8 __sync_val_compare_and_swap_8_c #endif WEAK uint64_t @@ -221,7 +224,6 @@ __sync_fetch_and_sub_8(uint64_t *ptr, uint64_t val) return r; } -#ifdef USE_GCC_ATOMIC_BUILTINS WEAK uint64_t __sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, uint64_t newval) { @@ -235,6 +237,5 @@ __sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, uint64_t newval) return r; } -#endif /* USE_GCC_ATOMIC_BUILTINS */ #endif