Skip to content

Commit bf85aa6

Browse files
committed
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.
2 parents 0b52da1 + 63e3932 commit bf85aa6

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

ci/docker/aarch64-unknown-linux-musl/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ FROM ubuntu:19.04
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-aarch64-linux-gnu qemu-user
6-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
6+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
77
tar xzf - && \
8-
cd musl-1.1.19 && \
8+
cd musl-1.1.22 && \
99
CC=aarch64-linux-gnu-gcc \
1010
./configure --prefix=/musl-aarch64 --enable-wrapper=yes && \
1111
make install -j4 && \
1212
cd .. && \
13-
rm -rf musl-1.1.19
13+
rm -rf musl-1.1.22
1414
# Install linux kernel headers sanitized for use with musl
1515
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
1616
tar xzf - && \

ci/docker/arm-unknown-linux-musleabihf/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-arm-linux-gnueabihf qemu-user
66

7-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | tar xzf -
8-
WORKDIR /musl-1.1.19
7+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | tar xzf -
8+
WORKDIR /musl-1.1.22
99
RUN CC=arm-linux-gnueabihf-gcc \
1010
CFLAGS="-march=armv6 -marm -mfpu=vfp" \
1111
./configure --prefix=/musl-arm --enable-wrapper=yes

ci/docker/i686-unknown-linux-musl/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ RUN apt-get install -y --no-install-recommends \
1212
# since otherwise the script will fail to find a compiler.
1313
# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
1414
# will call the non-existent binary 'i686-ar'.
15-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
15+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
1616
tar xzf - && \
17-
cd musl-1.1.19 && \
17+
cd musl-1.1.22 && \
1818
CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
1919
make CROSS_COMPILE= install -j4 && \
2020
cd .. && \
21-
rm -rf musl-1.1.19
21+
rm -rf musl-1.1.22
2222
# Install linux kernel headers sanitized for use with musl
2323
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
2424
tar xzf - && \

ci/docker/x86_64-unknown-linux-musl/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM ubuntu:19.04
33
RUN apt-get update
44
RUN apt-get install -y --no-install-recommends \
55
gcc make libc6-dev git curl ca-certificates
6-
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
6+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.22.tar.gz | \
77
tar xzf - && \
8-
cd musl-1.1.19 && \
8+
cd musl-1.1.22 && \
99
./configure --prefix=/musl-x86_64 && \
1010
make install -j4 && \
1111
cd .. && \
12-
rm -rf musl-1.1.19
12+
rm -rf musl-1.1.22
1313
# Install linux kernel headers sanitized for use with musl
1414
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
1515
tar xzf - && \

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ pub const MAP_LOCKED: ::c_int = 0x8000;
334334
pub const MAP_POPULATE: ::c_int = 0x10000;
335335
pub const MAP_NONBLOCK: ::c_int = 0x20000;
336336
pub const MAP_STACK: ::c_int = 0x40000;
337+
pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
338+
pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
337339

338340
pub const SOCK_STREAM: ::c_int = 2;
339341
pub const SOCK_DGRAM: ::c_int = 1;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ pub const MAP_EXECUTABLE: ::c_int = 0x01000;
373373
pub const MAP_POPULATE: ::c_int = 0x08000;
374374
pub const MAP_NONBLOCK: ::c_int = 0x010000;
375375
pub const MAP_STACK: ::c_int = 0x020000;
376+
pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
377+
pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
376378

377379
pub const ENOTSUP: ::c_int = EOPNOTSUPP;
378380
pub const EUCLEAN: ::c_int = 117;

src/unix/notbsd/linux/s390x/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ pub const MAP_NORESERVE: ::c_int = 0x04000;
517517
pub const MAP_POPULATE: ::c_int = 0x08000;
518518
pub const MAP_NONBLOCK: ::c_int = 0x010000;
519519
pub const MAP_STACK: ::c_int = 0x020000;
520+
pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
521+
pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
520522

521523
pub const EDEADLOCK: ::c_int = 35;
522524
pub const ENAMETOOLONG: ::c_int = 36;

0 commit comments

Comments
 (0)