summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-06-18 19:06:49 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-06-18 19:06:49 (GMT)
commitea34a84e543ecf0a05ea34fe5b7d84cb1bcd437d (patch)
tree44942e452792c871b803ca1a986fc68e2b84b1c7 /Modules
parente475e70128e5e12392faa10f6556460c308efc0a (diff)
downloadcpython-ea34a84e543ecf0a05ea34fe5b7d84cb1bcd437d.zip
cpython-ea34a84e543ecf0a05ea34fe5b7d84cb1bcd437d.tar.gz
cpython-ea34a84e543ecf0a05ea34fe5b7d84cb1bcd437d.tar.bz2
Patch from Lorenzo M. Catucci:
I discovered the [MREMAP_MAYMOVE] symbol is only defined when _GNU_SOURCE is defined; therefore, here is the change: if we are compiling for linux, define _GNU_SOURCE before including mman.h, and all is done.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/mmapmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 4b18466..5e8c562 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -16,6 +16,11 @@
/ ftp://squirl.nightmare.com/pub/python/python-ext.
*/
+#ifdef __linux__
+#define _GNU_SOURCE /* So we can get MREMAP_MAYMOVE defined when
+ sys/mman.h is included */
+#endif
+
#include <Python.h>
#ifndef MS_WIN32