summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik M. Bray <erik.bray@lri.fr>2017-03-21 17:32:33 +0100
committerErik M. Bray <erik.bray@lri.fr>2017-03-21 17:32:33 +0100
commita724b2a0fd86f4894de05f3a0db0b9e078c7d36d (patch)
tree98f01b0c42e6923ebf6fa6a4dc8a5d08b793ca1d
parentAdd patch to Pari (on top of prot_none_1.patch) that restores use of MAP_NORE... (diff)
Update the patch to always apply MAP_NORESERVE if it's defined (not just on Cygwin)u/embray/cygwin/pari-mmap
-rw-r--r--build/pkgs/pari/patches/prot_none_4.patch5
1 files changed, 2 insertions, 3 deletions
diff --git a/build/pkgs/pari/patches/prot_none_4.patch b/build/pkgs/pari/patches/prot_none_4.patch
index 8941030..0e8326a 100644
--- a/build/pkgs/pari/patches/prot_none_4.patch
+++ b/build/pkgs/pari/patches/prot_none_4.patch
@@ -1,13 +1,12 @@
-Fix mmap usage on Cygwin; see https://trac.sagemath.org/ticket/22633
diff --git a/src/language/init.c b/src/language/init.c
-index c2bd218..70543ba 100644
+index c2bd218..46ff613 100644
--- a/src/language/init.c
+++ b/src/language/init.c
@@ -594,14 +594,18 @@ pari_add_defaults_module(entree *ep)
#ifdef HAS_MMAP
#define PARI_STACK_ALIGN (sysconf(_SC_PAGE_SIZE))
-+#ifdef __CYGWIN__
++#ifdef MAP_NORESERVE
+#define PARI_MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE
+#else
+#define PARI_MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS