summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/linux/memfd_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/linux/memfd_create.c')
-rw-r--r--libc-top-half/musl/src/linux/memfd_create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/linux/memfd_create.c b/libc-top-half/musl/src/linux/memfd_create.c
new file mode 100644
index 0000000..1649fe5
--- /dev/null
+++ b/libc-top-half/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);
+}