summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2018-06-19 20:28:03 +0000
committerRich Felker <dalias@aerifal.cx>2018-06-20 21:36:04 -0400
commit38f2fa3d0207b8060302129c6464662751d4f2d3 (patch)
tree72457eacc9c5ebb9c9f39120c9a87b26f031ccdb /include/sys
parentb64d66d0b04fde0af63c3a292be423736294dca9 (diff)
downloadmusl-38f2fa3d0207b8060302129c6464662751d4f2d3.tar.gz
musl-38f2fa3d0207b8060302129c6464662751d4f2d3.tar.bz2
musl-38f2fa3d0207b8060302129c6464662751d4f2d3.tar.xz
musl-38f2fa3d0207b8060302129c6464662751d4f2d3.zip
add memfd_create syscall wrapper
memfd_create was added in linux v3.17 and glibc has api for it.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/mman.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 80e1da75..99d02a2e 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -99,6 +99,10 @@ extern "C" {
#define MREMAP_FIXED 2
#define MLOCK_ONFAULT 0x01
+
+#define MFD_CLOEXEC 0x0001U
+#define MFD_ALLOW_SEALING 0x0002U
+#define MFD_HUGETLB 0x0004U
#endif
#include <bits/mman.h>
@@ -119,6 +123,7 @@ int munlockall (void);
#ifdef _GNU_SOURCE
void *mremap (void *, size_t, size_t, int, ...);
int remap_file_pages (void *, size_t, int, size_t, int);
+int memfd_create (const char *, unsigned);
int mlock2 (const void *, size_t, unsigned);
#endif