about summary refs log tree commit diff
path: root/src/linux/memfd_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/memfd_create.c')
-rw-r--r--src/linux/memfd_create.c8
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 00000000..1649fe55
--- /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);
+}