about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/riscv
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-06-05 11:04:46 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-06-05 11:04:46 +0000
commitbef1cbf4da54aeb213e2542ccfdfebb22fb15820 (patch)
tree54d95a3e16e56c0a285bc8737ba8fc9f74e2159b /sysdeps/unix/sysv/linux/riscv
parent0e0577c93fcdd8922ca83763400f74ca10e46019 (diff)
downloadglibc-bef1cbf4da54aeb213e2542ccfdfebb22fb15820.tar.gz
glibc-bef1cbf4da54aeb213e2542ccfdfebb22fb15820.tar.xz
glibc-bef1cbf4da54aeb213e2542ccfdfebb22fb15820.zip
Add MAP_FIXED_NOREPLACE from Linux 4.17 to bits/mman.h.
Linux 4.17 adds MAP_FIXED_NOREPLACE (value 0x100000 on most
architectures, 0x200000 on alpha).  This patch adds that macro to
glibc's bits/mman.h headers.

Tested for x86_64.

	* sysdeps/unix/sysv/linux/aarch64/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): New macro.
	* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/arm/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/m68k/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/nios2/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/riscv/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/mman.h [__USE_MISC]
	(MAP_FIXED_NOREPLACE): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/riscv')
-rw-r--r--sysdeps/unix/sysv/linux/riscv/bits/mman.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/bits/mman.h b/sysdeps/unix/sysv/linux/riscv/bits/mman.h
index 84257723b4..c01fb00728 100644
--- a/sysdeps/unix/sysv/linux/riscv/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/riscv/bits/mman.h
@@ -32,6 +32,8 @@
 # define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
 # define MAP_SYNC	0x80000		/* Perform synchronous page
 					   faults for the mapping.  */
+# define MAP_FIXED_NOREPLACE 0x100000	/* MAP_FIXED but do not unmap
+					   underlying mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */