aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorShu-Chun Weng <scw@google.com>2019-08-19 11:09:47 -0700
committerLaurent Vivier <laurent@vivier.eu>2019-09-11 08:46:17 +0200
commit9bdfa4d23f4395dab89a60eb6b05a0308792bd66 (patch)
tree34e7c3dfeb9e5998a9c29bc76734cd9cf658769a /util
parent7f4341e84bb867c6e3397a978d3ee131bf8a889b (diff)
linux-user: add memfd_create
Add support for the memfd_create syscall. If the host does not have the libc wrapper, translate to a direct syscall with NC-macro. Buglink: https://bugs.launchpad.net/qemu/+bug/1734792 Signed-off-by: Shu-Chun Weng <scw@google.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20190819180947.180725-1-scw@google.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'util')
-rw-r--r--util/memfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/memfd.c b/util/memfd.c
index 00334e5b21..4a3c07e0be 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -35,7 +35,7 @@
#include <sys/syscall.h>
#include <asm/unistd.h>
-static int memfd_create(const char *name, unsigned int flags)
+int memfd_create(const char *name, unsigned int flags)
{
#ifdef __NR_memfd_create
return syscall(__NR_memfd_create, name, flags);