diff options
author | Szabolcs Nagy <nsz@port70.net> | 2018-06-19 20:28:03 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-06-20 21:36:04 -0400 |
commit | 38f2fa3d0207b8060302129c6464662751d4f2d3 (patch) | |
tree | 72457eacc9c5ebb9c9f39120c9a87b26f031ccdb /src/linux | |
parent | b64d66d0b04fde0af63c3a292be423736294dca9 (diff) | |
download | musl-38f2fa3d0207b8060302129c6464662751d4f2d3.zip musl-38f2fa3d0207b8060302129c6464662751d4f2d3.tar.gz musl-38f2fa3d0207b8060302129c6464662751d4f2d3.tar.bz2 |
add memfd_create syscall wrapper
memfd_create was added in linux v3.17 and glibc has api for it.
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/memfd_create.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/linux/memfd_create.c b/src/linux/memfd_create.c new file mode 100644 index 0000000..1649fe5 --- /dev/null +++ b/src/linux/memfd_create.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE 1 +#include <sys/mman.h> +#include "syscall.h" + +int memfd_create(const char *name, unsigned flags) +{ + return syscall(SYS_memfd_create, name, flags); +} |