From a90c66736c79a7486e575c93962c2f38406cbda3 Mon Sep 17 00:00:00 2001 From: LDA Date: Fri, 9 Aug 2024 12:03:09 +0200 Subject: [PATCH] [MOD/WIP] Disable thread-local storage for LMDB DB locks ought to be enough... --- configure | 2 +- src/Db/LMDB.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 0018605..d50d752 100755 --- a/configure +++ b/configure @@ -113,7 +113,7 @@ if [ -n "$TLS_IMPL" ]; then fi if [ -n "$EDB_IMPL" ]; then - CFLAGS="${CFLAGS} -DEDB_IMPL=${EDB_IMPL}" + CFLAGS="${CFLAGS} -D${EDB_IMPL}" LIBS="${LIBS} ${EDB_LIBS}" fi diff --git a/src/Db/LMDB.c b/src/Db/LMDB.c index cee841f..edee68f 100644 --- a/src/Db/LMDB.c +++ b/src/Db/LMDB.c @@ -9,7 +9,7 @@ #include #include -#ifdef EDB_IMPL +#ifdef EDB_LMDB #include @@ -568,7 +568,7 @@ DbOpenLMDB(char *dir, size_t size) return NULL; } mdb_env_set_maxdbs(env, 4); - if ((code = mdb_env_open(env, dir, 0, 0644)) != 0) + if ((code = mdb_env_open(env, dir, MDB_NOTLS, 0644)) != 0) { Log(LOG_ERR, "%s: could not open LMDB env: %s", @@ -589,7 +589,7 @@ DbOpenLMDB(char *dir, size_t size) db->base.delete = LMDBDelete; db->base.exists = LMDBExists; db->base.close = LMDBClose; - db->base.list = LMDBList; /* TODO: This one is gonna be Fun. */ + db->base.list = LMDBList; return (Db *) db; }