From c05fb6862da80da96cbd3919b038b7efded6d626 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Sat, 12 Mar 2016 20:45:16 +0300 Subject: [PATCH] mdbx: mdbx_env_set_syncbytes() only for MDBX-mode. Change-Id: I7836d4b7b538fc15407122ea40c36a2f8a5ae033 --- mdb.c | 4 +++- mdbx.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mdb.c b/mdb.c index 625a122e..7a3baa8b 100644 --- a/mdb.c +++ b/mdb.c @@ -4008,8 +4008,9 @@ fail: return rc; } +#if MDBX_MODE_ENABLED int __cold -mdb_env_set_syncbytes(MDB_env *env, size_t bytes) +mdbx_env_set_syncbytes(MDB_env *env, size_t bytes) { if (unlikely(!env)) return EINVAL; @@ -4020,6 +4021,7 @@ mdb_env_set_syncbytes(MDB_env *env, size_t bytes) env->me_sync_threshold = bytes; return env->me_map ? mdb_env_sync(env, 0) : 0; } +#endif /* MDBX_MODE_ENABLED */ /** Read the environment parameters of a DB environment before * mapping it into memory. diff --git a/mdbx.h b/mdbx.h index 230afc85..4de12f1a 100644 --- a/mdbx.h +++ b/mdbx.h @@ -80,7 +80,6 @@ #define mdb_env_set_userctx mdbx_env_set_userctx #define mdb_env_get_userctx mdbx_env_get_userctx #define mdb_env_set_assert mdbx_env_set_assert -#define mdb_env_set_syncbytes mdbx_env_set_syncbytes #define mdb_txn_begin mdbx_txn_begin #define mdb_txn_env mdbx_txn_env #define mdb_txn_id mdbx_txn_id