summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-23 23:53:34 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-23 23:53:34 +0200
commit132b9c3edf0c376f3a9002a8f51431464ba430f6 (patch)
tree2efeb8984de1cc2f43e4fe351d30cd12ce694460
parent098a0c2a7ba3e16d6a8c01a197ce0d44e62b8aef (diff)
downloadsink-132b9c3edf0c376f3a9002a8f51431464ba430f6.tar.gz
sink-132b9c3edf0c376f3a9002a8f51431464ba430f6.zip
We need an extern declaration for non-static variables.
Or so says the compiler.
-rw-r--r--common/storage_lmdb.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 5fb1d0f..68157c9 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -44,12 +44,14 @@ namespace Storage {
44 44
45extern QReadWriteLock sDbisLock; 45extern QReadWriteLock sDbisLock;
46extern QReadWriteLock sEnvironmentsLock; 46extern QReadWriteLock sEnvironmentsLock;
47extern QMutex sCreateDbiLock;
47extern QHash<QString, MDB_env *> sEnvironments; 48extern QHash<QString, MDB_env *> sEnvironments;
48extern QHash<QString, MDB_dbi> sDbis; 49extern QHash<QString, MDB_dbi> sDbis;
49 50
50 51
51QReadWriteLock sDbisLock; 52QReadWriteLock sDbisLock;
52QReadWriteLock sEnvironmentsLock; 53QReadWriteLock sEnvironmentsLock;
54QMutex sCreateDbiLock;
53QHash<QString, MDB_env *> sEnvironments; 55QHash<QString, MDB_env *> sEnvironments;
54QHash<QString, MDB_dbi> sDbis; 56QHash<QString, MDB_dbi> sDbis;
55 57
@@ -106,9 +108,6 @@ static QList<QByteArray> getDatabaseNames(MDB_txn *transaction)
106 * and we always need to commit the transaction ASAP 108 * and we always need to commit the transaction ASAP
107 * We can only ever enter from one point per process. 109 * We can only ever enter from one point per process.
108 */ 110 */
109
110QMutex sCreateDbiLock;
111
112static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi) 111static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi)
113{ 112{
114 113