summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:42:13 +0100
committerwm4 <wm4@nowhere>2014-01-01 20:57:27 +0100
commit29b68d69c05406460602c40a5222e941547b2f87 (patch)
tree8c6e450881184b114490155fe77e4d984fad18da /compat
parent6c770eb6df068d4c19894e5e64d8d129a843f756 (diff)
downloadmpv-29b68d69c05406460602c40a5222e941547b2f87.tar.bz2
mpv-29b68d69c05406460602c40a5222e941547b2f87.tar.xz
build: make configure fail if both __atomic and __sync are not available
Diffstat (limited to 'compat')
-rw-r--r--compat/atomics.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/compat/atomics.h b/compat/atomics.h
index 368476a964..14f0f2720f 100644
--- a/compat/atomics.h
+++ b/compat/atomics.h
@@ -24,7 +24,9 @@
#if HAVE_ATOMIC_BUILTINS
# define mp_memory_barrier() __atomic_thread_fence(__ATOMIC_SEQ_CST)
# define mp_atomic_add_and_fetch(a, b) __atomic_add_fetch(a, b,__ATOMIC_SEQ_CST)
-#else
+#elif HAVE_SYNC_BUILTINS
# define mp_memory_barrier() __sync_synchronize()
# define mp_atomic_add_and_fetch(a, b) __sync_add_and_fetch(a, b)
+#else
+# error "this should have been a configuration error, report a bug please"
#endif