summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2011-12-22 07:45:53 (GMT)
committerRoss Lagerwall <rosslagerwall@gmail.com>2011-12-22 07:45:53 (GMT)
commit667d75d059384b12a4cd167a9aebc0c1c3057ef4 (patch)
treef29f531760e2122798be3231dc2fbb70be4be810
parent031bf95d3212d246a44e8e3a23ff32023ab905e9 (diff)
downloadcpython-667d75d059384b12a4cd167a9aebc0c1c3057ef4.zip
cpython-667d75d059384b12a4cd167a9aebc0c1c3057ef4.tar.gz
cpython-667d75d059384b12a4cd167a9aebc0c1c3057ef4.tar.bz2
Don't redefine _GNU_SOURCE if it's already defined.
-rw-r--r--Modules/_posixsubprocess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 4e38bbe..e8aedeb 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -1,7 +1,7 @@
/* Authors: Gregory P. Smith & Jeffrey Yasskin */
#include "Python.h"
-#ifdef HAVE_PIPE2
-#define _GNU_SOURCE
+#if defined(HAVE_PIPE2) && !defined(_GNU_SOURCE)
+# define _GNU_SOURCE
#endif
#include <unistd.h>
#include <fcntl.h>