summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-08-06 08:15:44 (GMT)
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-08-06 08:15:44 (GMT)
commit254db0ae1b3b7ab11c43e3cce2241b3a039682d3 (patch)
tree15a84af9374435b8179de09323d37558e7a30b2f /src
parent4a1e5ef60c216bb1dcd2dbbf86fd239128f6a6cb (diff)
parentbeb55fa825acf524fe69dd8624bc4eddda39b7e5 (diff)
downloadglog-254db0ae1b3b7ab11c43e3cce2241b3a039682d3.zip
glog-254db0ae1b3b7ab11c43e3cce2241b3a039682d3.tar.gz
glog-254db0ae1b3b7ab11c43e3cce2241b3a039682d3.tar.bz2
Merge pull request #34 from bsilver8192/fix-macro-redefinition
Fix redefinition of _XOPEN_SOURCE.
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;