summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:42:13 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:52:54 +0100
commite568299c2c2f438cbbee687aa57d0a6cdecf7e0b (patch)
tree1d852c2b170d45e572f1fa767dd5e19f23f4ab3b /compat
parentfaf68f3b8eb51427949833999264aecf801a0ced (diff)
downloadmpv-e568299c2c2f438cbbee687aa57d0a6cdecf7e0b.tar.bz2
mpv-e568299c2c2f438cbbee687aa57d0a6cdecf7e0b.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