From 74218f3d6ca8ca9943ff9d08b7926e38fb13b329 Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov Date: Wed, 21 May 2014 07:56:43 +1000 Subject: [PATCH] Define AO_REQUIRE_CAS (fixes FTBFS on 'hppa') to fix FTBFS due to undeclared atomic functions. As reported https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748571 by John David Anglin ~~~~ ./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()': ./include/atomic.h:42:36: error: 'AO_fetch_and_add1' was not declared in this scope return AO_fetch_and_add1(&val) + 1; ^ ./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()': ./include/atomic.h:45:42: error: 'AO_fetch_and_sub1_write' was not declared in this scope return AO_fetch_and_sub1_write(&val) - 1; ^ ./include/atomic.h: In member function 'void ceph::atomic_t::add(size_t)': ./include/atomic.h:48:36: error: 'AO_fetch_and_add' was not declared in this scope AO_fetch_and_add(&val, add_me); ^ ./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)': ./include/atomic.h:52:48: error: 'AO_fetch_and_add_write' was not declared in this scope AO_fetch_and_add_write(&val, (AO_t)negsub); ^ ./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()': ./include/atomic.h:46:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[5]: *** [cls/user/cls_user_client.o] Error 1 ~~~~ Signed-off-by: Dmitry Smirnov --- src/include/atomic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/atomic.h b/src/include/atomic.h index 537fa989cd3f6..38f8fd116100a 100644 --- a/src/include/atomic.h +++ b/src/include/atomic.h @@ -25,6 +25,7 @@ #ifndef NO_ATOMIC_OPS // libatomic_ops implementation +#define AO_REQUIRE_CAS #include // reinclude our assert to clobber the system one -- 2.39.5