Only define memfd_create when not already defined

This commit is contained in:
Wim Taymans 2017-11-24 17:23:40 +01:00
parent bde1012c5c
commit 2a86814bb8
3 changed files with 7 additions and 0 deletions

View file

@ -20,6 +20,7 @@
#include <sys/syscall.h>
#include <fcntl.h>
#ifndef HAVE_MEMFD_CREATE
/*
* No glibc wrappers exist for memfd_create(2), so provide our own.
*
@ -32,6 +33,7 @@ static inline int
memfd_create(const char *name, unsigned int flags) {
return syscall(SYS_memfd_create, name, flags);
}
#endif
/* memfd_create(2) flags */