aboutsummaryrefslogtreecommitdiff
path: root/libc/musl/src/linux/memfd_create.c
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-03-13 12:56:58 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-03-13 12:56:58 -0400
commit54edbc6815e42457cd28fa9f1b94e732504b3fc9 (patch)
tree36c97169bf0cd59326a93b8c3c0d458f94aed8a9 /libc/musl/src/linux/memfd_create.c
parent4cb55d3af6a71467b7d4399bedb961c81e9ad3d5 (diff)
parentd495dcc3c952c99e5358d9610cf09eb856f643b0 (diff)
downloadzig-54edbc6815e42457cd28fa9f1b94e732504b3fc9.tar.gz
zig-54edbc6815e42457cd28fa9f1b94e732504b3fc9.zip
Merge remote-tracking branch 'origin/master' into llvm8
Diffstat (limited to 'libc/musl/src/linux/memfd_create.c')
-rw-r--r--libc/musl/src/linux/memfd_create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/musl/src/linux/memfd_create.c b/libc/musl/src/linux/memfd_create.c
new file mode 100644
index 0000000000..1649fe5548
--- /dev/null
+++ b/libc/musl/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);
+}