[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#8620) GCC error undeclared PTHREAD_MUTEX_ROBUST
Full_Name: Adam Carlin
Version: lmdb 0.9.20
OS: Windows 10
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (108.27.217.230)
I'm using Windows 10 with msys2 64bit (http://www.msys2.org/) which utilizes
mingw-w64. When I compile lmdb (https://github.com/LMDB/lmdb/tree/mdb.RE/0.9)
v0.9.20 it spits out the error message below...
blissend@shockedloris MSYS /c/Compile/lmdb/libraries/liblmdb
$ make
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized -c mdb.c
mdb.c: In function ?mdb_env_setup_locks?:
mdb.c:4853:17: warning: implicit declaration of function
?pthread_mutexattr_setrobust? [-Wimplicit-function-declaration]
if (!rc) rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
mdb.c:4853:53: error: ?PTHREAD_MUTEX_ROBUST? undeclared (first use in this
function)
if (!rc) rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST);
^~~~~~~~~~~~~~~~~~~~
mdb.c:4853:53: note: each undeclared identifier is reported only once for each
function it appears in
mdb.c: In function ?mdb_mutex_failed?:
mdb.c:362:37: warning: implicit declaration of function
?pthread_mutex_consistent? [-Wimplicit-function-declaration]
#define mdb_mutex_consistent(mutex) pthread_mutex_consistent(mutex)
^
mdb.c:10220:10: note: in expansion of macro ?mdb_mutex_consistent?
rc2 = mdb_mutex_consistent(mutex);
^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:83: mdb.o] Error 1
Anyway to fix this? If this helps, I've noticed that line 4853 for above error
has an if check for MDB_ROBUST_SUPPORTED which gets defined on line 278. However
the missing declaration of pthread_mutexattr_setrobust is in another if check
above line 278.