Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HAMANO Tsukasa
OpenLDAP
Commits
2be67975
Commit
2be67975
authored
Oct 31, 2015
by
Howard Chu
Browse files
Add MDB_NO_ROBUST to disable Robust Mutexes
parent
2ee9c4a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/Makefile
View file @
2be67975
...
...
@@ -13,6 +13,7 @@
# - MDB_FDATASYNC
# - MDB_FDATASYNC_WORKS
# - MDB_USE_PWRITEV
# - MDB_NO_ROBUST
#
# There may be other macros in mdb.c of interest. You should
# read mdb.c before changing any of them.
...
...
libraries/liblmdb/mdb.c
View file @
2be67975
...
...
@@ -252,7 +252,25 @@ union semun {
#define MDB_OWNERDEAD EOWNERDEAD
/**< #LOCK_MUTEX0() result if dead owner */
#endif
#ifdef MDB_OWNERDEAD
/* Android currently lacks Robust Mutex support */
#if defined(ANDROID) && defined(MDB_USE_POSIX_MUTEX)
#define MDB_NO_ROBUST 1
#endif
/** Some platforms define the EOWNERDEAD error code
* even though they don't support Robust Mutexes.
* Compile with -DMDB_NO_ROBUST, or use some other
* mechanism like -DMDB_USE_SYSV_SEM instead of
* -DMDB_USE_POSIX_MUTEX. (SysV semaphores are
* also Robust, but some systems don't support them
* either.)
*/
#ifndef MDB_NO_ROBUST
#define MDB_NO_ROBUST 0
#endif
#if defined(MDB_OWNERDEAD) && !(MDB_NO_ROBUST)
#define MDB_ROBUST_SUPPORTED 1
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment