dogecoin/depends/patches/bdb-5.1.29-clang-osx/mut_tas.c.patch
Michi Lumin b0ac2c461f Required patches to compile bdb 5.1.29 via clang on OSX
These patches must be applied to the bdb-5.1.29 source from Oracle, and then compiled, for the Mac client to build.
 Using an existing 5.1.29 binary will not work; as it was likely compiled with gcc; which OSX no longer natively supports.
2019-03-25 05:36:12 +00:00

21 lines
632 B
Diff

--- old-bdb/src/mutex/mut_tas.c 2011-10-25 14:39:35.000000000 -0600
+++ new-bdb/src/mutex/mut_tas.c 2018-06-01 20:04:25.000000000 -0600
@@ -48,7 +48,7 @@
#ifdef HAVE_SHARED_LATCHES
if (F_ISSET(mutexp, DB_MUTEX_SHARED))
- atomic_init(&mutexp->sharecount, 0);
+ atomic_init_db(&mutexp->sharecount, 0);
else
#endif
if (MUTEX_INIT(&mutexp->tas)) {
@@ -521,7 +521,7 @@
F_CLR(mutexp, DB_MUTEX_LOCKED);
/* Flush flag update before zeroing count */
MEMBAR_EXIT();
- atomic_init(&mutexp->sharecount, 0);
+ atomic_init_db(&mutexp->sharecount, 0);
} else {
DB_ASSERT(env, sharecount > 0);
MEMBAR_EXIT();