diff --git a/src/collection/backend/lmdb.cc b/src/collection/backend/lmdb.cc index d327e750..18804d45 100644 --- a/src/collection/backend/lmdb.cc +++ b/src/collection/backend/lmdb.cc @@ -33,6 +33,9 @@ namespace collection { namespace backend { +#ifdef WITH_LMDB + + LMDB::LMDB() : m_env(NULL) { mdb_env_create(&m_env); mdb_env_open(m_env, "./modsec-shared-collections", @@ -646,6 +649,7 @@ end_txn: return; } +#endif } // namespace backend } // namespace collection diff --git a/src/collection/backend/lmdb.h b/src/collection/backend/lmdb.h index 2468baba..0e606ac2 100644 --- a/src/collection/backend/lmdb.h +++ b/src/collection/backend/lmdb.h @@ -36,6 +36,8 @@ #ifndef SRC_COLLECTION_BACKEND_LMDB_H_ #define SRC_COLLECTION_BACKEND_LMDB_H_ +#ifdef WITH_LMDB + #ifdef __cplusplus namespace modsecurity { namespace collection { @@ -78,5 +80,6 @@ class LMDB : } // namespace modsecurity #endif +#endif // WITH_LMDB #endif // SRC_COLLECTION_BACKEND_LMDB_H_