dogecoin/depends/patches/bdb-5.1.29-clang-osx/mp_mvcc.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
607 B
Diff

--- old-bdb/src/mp/mp_mvcc.c 2011-10-25 14:39:35.000000000 -0600
+++ new-bdb/src/mp/mp_mvcc.c 2018-06-01 20:02:45.000000000 -0600
@@ -276,7 +276,7 @@
#else
memcpy(frozen_bhp, bhp, SSZA(BH, buf));
#endif
- atomic_init(&frozen_bhp->ref, 0);
+ atomic_init_db(&frozen_bhp->ref, 0);
if (mutex != MUTEX_INVALID)
frozen_bhp->mtx_buf = mutex;
else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
@@ -428,7 +428,7 @@
#endif
alloc_bhp->mtx_buf = mutex;
MUTEX_LOCK(env, alloc_bhp->mtx_buf);
- atomic_init(&alloc_bhp->ref, 1);
+ atomic_init_db(&alloc_bhp->ref, 1);
F_CLR(alloc_bhp, BH_FROZEN);
}