From 38f2fa3d0207b8060302129c6464662751d4f2d3 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 19 Jun 2018 20:28:03 +0000 Subject: add memfd_create syscall wrapper memfd_create was added in linux v3.17 and glibc has api for it. --- src/linux/memfd_create.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/linux/memfd_create.c (limited to 'src/linux') 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 +#include "syscall.h" + +int memfd_create(const char *name, unsigned flags) +{ + return syscall(SYS_memfd_create, name, flags); +} -- cgit v1.2.1