From: Brian Silverman Date: Tue, 16 Jun 2015 23:50:25 +0000 (-0700) Subject: Fix redefinition of _XOPEN_SOURCE. X-Git-Tag: submit/tizen/20180313.064233~79^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=beb55fa825acf524fe69dd8624bc4eddda39b7e5;p=platform%2Fupstream%2Fglog.git Fix redefinition of _XOPEN_SOURCE. Under Debian Jessie, I get a warning about redefining _XOPEN_SOURCE which is easy to fix. --- 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 typedef pthread_rwlock_t MutexType;