xref: /OK3568_Linux_fs/buildroot/package/berkeleydb/0002-atomic_compare_exchange.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Rename __atomic_compare_exchange to not clash with gcc built-in
2
3Downloaded from
4https://src.fedoraproject.org/cgit/rpms/libdb.git/commit/?id=d6841b3b46a51db98c162347211a5a64d154ea37
5
6Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
7
8--- db-5.3.28/src/dbinc/atomic.h.old	2018-05-23 09:20:04.216914922 +0200
9+++ db-5.3.28/src/dbinc/atomic.h	2018-05-23 09:20:49.510057897 +0200
10@@ -144,7 +144,7 @@
11 #define	atomic_inc(env, p)	__atomic_inc(p)
12 #define	atomic_dec(env, p)	__atomic_dec(p)
13 #define	atomic_compare_exchange(env, p, o, n)	\
14-	__atomic_compare_exchange((p), (o), (n))
15+	__db_atomic_compare_exchange((p), (o), (n))
16 static inline int __atomic_inc(db_atomic_t *p)
17 {
18 	int	temp;
19@@ -176,7 +176,7 @@
20  * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
21  * which configure could be changed to use.
22  */
23-static inline int __atomic_compare_exchange(
24+static inline int __db_atomic_compare_exchange(
25 	db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
26 {
27 	atomic_value_t was;
28