From: Hallvard Furuseth Date: Tue, 17 Nov 2015 17:22:25 +0000 (+0100) Subject: ITS#7209 Default MDB_DSYNC = O_SYNC if no O_DSYNC X-Git-Tag: LMDB_0.9.17~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2a839d5dfab19b23fe90c1680a5e29bf4a6e2f09;p=openldap ITS#7209 Default MDB_DSYNC = O_SYNC if no O_DSYNC --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index fdfcb35109..def326a672 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -403,10 +403,13 @@ static int mdb_mutex_failed(MDB_env *env, mdb_mutexref_t mutex, int rc); * * @note If O_DSYNC is undefined but exists in /usr/include, * preferably set some compiler flag to get the definition. - * Otherwise compile with the less efficient -DMDB_DSYNC=O_SYNC. */ #ifndef MDB_DSYNC +# ifdef O_DSYNC # define MDB_DSYNC O_DSYNC +# else +# define MDB_DSYNC O_SYNC +# endif #endif #endif