db: fix build with libc++-3.8

This commit is contained in:
Daiderd Jordan
2016-11-13 00:04:50 +01:00
parent fcfe3c0909
commit 7e933af173
8 changed files with 37 additions and 271 deletions
+18
View File
@@ -20,6 +20,24 @@ stdenv.mkDerivation (rec {
patches = extraPatches;
# https://community.oracle.com/thread/3952592
# this patch renames some sybols that conflict with libc++-3.8
# symbols: atomic_compare_exchange, atomic_init, store
prePatch = ''
substituteInPlace src/dbinc/db.in \
--replace '#define store' '#define store_db'
substituteInPlace src/dbinc/atomic.h \
--replace atomic_compare_exchange atomic_compare_exchange_db \
--replace atomic_init atomic_init_db
substituteInPlace src/mp/*.c \
--replace atomic_compare_exchange atomic_compare_exchange_db \
--replace atomic_init atomic_init_db
substituteInPlace src/mutex/*.c \
--replace atomic_compare_exchange atomic_compare_exchange_db \
--replace atomic_init atomic_init_db
'';
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")