summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Silverman <bsilver16384@gmail.com>2015-06-16 23:50:25 (GMT)
committerBrian Silverman <bsilver16384@gmail.com>2015-06-16 23:50:57 (GMT)
commitbeb55fa825acf524fe69dd8624bc4eddda39b7e5 (patch)
tree12eb67c9ba6d2b6b9e8f5fc8ba081992cb0254e7 /src
parent287ab79862c112ccc197160088cb640295392e35 (diff)
downloadglog-beb55fa825acf524fe69dd8624bc4eddda39b7e5.zip
glog-beb55fa825acf524fe69dd8624bc4eddda39b7e5.tar.gz
glog-beb55fa825acf524fe69dd8624bc4eddda39b7e5.tar.bz2
Fix redefinition of _XOPEN_SOURCE.
Under Debian Jessie, I get a warning about redefining _XOPEN_SOURCE which is easy to fix.
Diffstat (limited to 'src')
-rw-r--r--src/base/mutex.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/mutex.h b/src/base/mutex.h
index 37527d5..ced2b99 100644
--- a/src/base/mutex.h
+++ b/src/base/mutex.h
@@ -134,7 +134,9 @@
// *does* cause problems for FreeBSD, or MacOSX, but isn't needed
// for locking there.)
# ifdef __linux__
-# define _XOPEN_SOURCE 500 // may be needed to get the rwlock calls
+# 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
+# endif
# endif
# include <pthread.h>
typedef pthread_rwlock_t MutexType;