From 63e3932d549d28e4aa9a29b3c6fa3094112726e6 Mon Sep 17 00:00:00 2001
From: Inokentiy Babushkin <twk@twki.de>
Date: Tue, 21 May 2019 13:50:25 +0200
Subject: [PATCH] Disabled MAP_SHARED_VALIDATE and MAP_FIXED_NOREPLACE on musl
 for now.

Because we cannot yet bring a more recent musl to the mips and mipsel
architectures, we disable support for these constant until a cascading
update with rust-lang/rust has been done.
---
 src/unix/notbsd/linux/mips/mod.rs  | 2 ++
 src/unix/notbsd/linux/mod.rs       | 3 ---
 src/unix/notbsd/linux/other/mod.rs | 2 ++
 src/unix/notbsd/linux/s390x/mod.rs | 2 ++
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs
index b7001866..6f739758 100644
--- a/src/unix/notbsd/linux/mips/mod.rs
+++ b/src/unix/notbsd/linux/mips/mod.rs
@@ -334,6 +334,8 @@ pub const MAP_LOCKED: ::c_int = 0x8000;
 pub const MAP_POPULATE: ::c_int = 0x10000;
 pub const MAP_NONBLOCK: ::c_int = 0x20000;
 pub const MAP_STACK: ::c_int = 0x40000;
+pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
+pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
 
 pub const SOCK_STREAM: ::c_int = 2;
 pub const SOCK_DGRAM: ::c_int = 1;
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 212c90cf..3d9ccada 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1256,9 +1256,6 @@ pub const LIO_NOP: ::c_int = 2;
 pub const LIO_WAIT: ::c_int = 0;
 pub const LIO_NOWAIT: ::c_int = 1;
 
-pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
-pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
-
 pub const MREMAP_MAYMOVE: ::c_int = 1;
 pub const MREMAP_FIXED: ::c_int = 2;
 
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 8a643768..13a1a0a0 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -377,6 +377,8 @@ pub const MAP_EXECUTABLE: ::c_int = 0x01000;
 pub const MAP_POPULATE: ::c_int = 0x08000;
 pub const MAP_NONBLOCK: ::c_int = 0x010000;
 pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
+pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
 
 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
 pub const EUCLEAN: ::c_int = 117;
diff --git a/src/unix/notbsd/linux/s390x/mod.rs b/src/unix/notbsd/linux/s390x/mod.rs
index ebe9d417..084fd89a 100644
--- a/src/unix/notbsd/linux/s390x/mod.rs
+++ b/src/unix/notbsd/linux/s390x/mod.rs
@@ -517,6 +517,8 @@ pub const MAP_NORESERVE: ::c_int = 0x04000;
 pub const MAP_POPULATE: ::c_int = 0x08000;
 pub const MAP_NONBLOCK: ::c_int = 0x010000;
 pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
+pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
 
 pub const EDEADLOCK: ::c_int = 35;
 pub const ENAMETOOLONG: ::c_int = 36;
-- 
GitLab