Fix redefinition of _XOPEN_SOURCE.

Under Debian Jessie, I get a warning about redefining _XOPEN_SOURCE
which is easy to fix.
This commit is contained in:
Brian Silverman 2015-06-16 16:50:25 -07:00
parent 287ab79862
commit beb55fa825

View File

@ -134,8 +134,10 @@
// *does* cause problems for FreeBSD, or MacOSX, but isn't needed // *does* cause problems for FreeBSD, or MacOSX, but isn't needed
// for locking there.) // for locking there.)
# ifdef __linux__ # ifdef __linux__
# ifndef _XOPEN_SOURCE // Some other header might have already set it for us.
# define _XOPEN_SOURCE 500 // may be needed to get the rwlock calls # define _XOPEN_SOURCE 500 // may be needed to get the rwlock calls
# endif # endif
# endif
# include <pthread.h> # include <pthread.h>
typedef pthread_rwlock_t MutexType; typedef pthread_rwlock_t MutexType;
#elif defined(HAVE_PTHREAD) #elif defined(HAVE_PTHREAD)