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

--- old-bdb/src/mp/mp_region.c 2011-10-25 14:39:35.000000000 -0600
+++ new-bdb/src/mp/mp_region.c 2018-06-01 20:03:28.000000000 -0600
@@ -229,7 +229,7 @@
MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
return (ret);
SH_TAILQ_INIT(&htab[i].hash_bucket);
- atomic_init(&htab[i].hash_page_dirty, 0);
+ atomic_init_db(&htab[i].hash_page_dirty, 0);
}
/*
@@ -275,7 +275,7 @@
hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
mtx_base + (i % dbenv->mp_mtxcount);
SH_TAILQ_INIT(&hp->hash_bucket);
- atomic_init(&hp->hash_page_dirty, 0);
+ atomic_init_db(&hp->hash_page_dirty, 0);
#ifdef HAVE_STATISTICS
hp->hash_io_wait = 0;
hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;