summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-21 18:53:49 +0000
committerbors <bors@rust-lang.org>2019-05-21 18:53:49 +0000
commitbf85aa6dfc5b782eb372b987fbbe2bc50e27c61b (patch)
tree48efaacd3090f860bc4e7976d581d29c2e8710da
parent0b52da1c715a3532c7175a5967cad7f42c2d63bf (diff)
parent63e3932d549d28e4aa9a29b3c6fa3094112726e6 (diff)
downloadrust-libc-bf85aa6dfc5b782eb372b987fbbe2bc50e27c61b.tar.gz
Auto merge of #1340 - ibabushkin:mmap_flags, r=gnzlbg
Added MAP_FIXED_NOREPLACE and MAP_SHARED_VALIDATE consts. This addresses #1339 and #1315. I believe the location of the constants is correct as-is, as both flags are linux-specific additions. Let me know if I missed anything.
-rw-r--r--ci/docker/aarch64-unknown-linux-musl/Dockerfile6
-rw-r--r--ci/docker/arm-unknown-linux-musleabihf/Dockerfile4
-rw-r--r--ci/docker/i686-unknown-linux-musl/Dockerfile6
-rw-r--r--ci/docker/x86_64-unknown-linux-musl/Dockerfile6
-rw-r--r--src/unix/notbsd/linux/mips/mod.rs2
-rw-r--r--src/unix/notbsd/linux/other/mod.rs2
-rw-r--r--src/unix/notbsd/linux/s390x/mod.rs2
7 files changed, 17 insertions, 11 deletions
diff --git a/ci/docker/aarch64-unknown-linux-musl/Dockerfile b/ci/docker/aarch64-unknown-linux-musl/Dockerfile
index 143a960631..ea73657429 100644
--- a/ci/docker/aarch64-unknown-linux-musl/Dockerfile
+++ b/ci/docker/aarch64-unknown-linux-musl/Dockerfile
@@ -3,14 +3,14 @@ FROM ubuntu:19.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-aarch64-linux-gnu qemu-user
-RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
+RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
tar xzf - && \
- cd musl-1.1.19 && \
+ cd musl-1.1.22 && \
CC=aarch64-linux-gnu-gcc \
./configure --prefix=/musl-aarch64 --enable-wrapper=yes && \
make install -j4 && \
cd .. && \
- rm -rf musl-1.1.19
+ rm -rf musl-1.1.22
# Install linux kernel headers sanitized for use with musl
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
diff --git a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile
index e29e854cc9..b001fd2c36 100644
--- a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile
+++ b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile
@@ -4,8 +4,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
gcc-arm-linux-gnueabihf qemu-user
-RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | tar xzf -
-WORKDIR /musl-1.1.19
+RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | tar xzf -
+WORKDIR /musl-1.1.22
RUN CC=arm-linux-gnueabihf-gcc \
CFLAGS="-march=armv6 -marm -mfpu=vfp" \
./configure --prefix=/musl-arm --enable-wrapper=yes
diff --git a/ci/docker/i686-unknown-linux-musl/Dockerfile b/ci/docker/i686-unknown-linux-musl/Dockerfile
index c085c10b14..9dd44e0836 100644
--- a/ci/docker/i686-unknown-linux-musl/Dockerfile
+++ b/ci/docker/i686-unknown-linux-musl/Dockerfile
@@ -12,13 +12,13 @@ RUN apt-get install -y --no-install-recommends \
# since otherwise the script will fail to find a compiler.
# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
# will call the non-existent binary 'i686-ar'.
-RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
+RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
tar xzf - && \
- cd musl-1.1.19 && \
+ cd musl-1.1.22 && \
CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
make CROSS_COMPILE= install -j4 && \
cd .. && \
- rm -rf musl-1.1.19
+ rm -rf musl-1.1.22
# Install linux kernel headers sanitized for use with musl
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
diff --git a/ci/docker/x86_64-unknown-linux-musl/Dockerfile b/ci/docker/x86_64-unknown-linux-musl/Dockerfile
index 59164d22ed..e99764fdf7 100644
--- a/ci/docker/x86_64-unknown-linux-musl/Dockerfile
+++ b/ci/docker/x86_64-unknown-linux-musl/Dockerfile
@@ -3,13 +3,13 @@ FROM ubuntu:19.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates
-RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
+RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
tar xzf - && \
- cd musl-1.1.19 && \
+ cd musl-1.1.22 && \
./configure --prefix=/musl-x86_64 && \
make install -j4 && \
cd .. && \
- rm -rf musl-1.1.19
+ rm -rf musl-1.1.22
# Install linux kernel headers sanitized for use with musl
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
tar xzf - && \
diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs
index 35534b44d2..c1407b6c46 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/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 1a97d1c8d6..8ebbfbb03b 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -373,6 +373,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 d4cf95678e..b9059687df 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;