oss-fuzz: Try harder to fix build

Apparently memfd_create() is newish in glibc, and oss-fuzz
uses Ubuntu 16.04 as base for its docker images, which doens't
yet have memfd_create(). But, not to worry, it does have the syscall
define and that's all we really need :/
This commit is contained in:
Nico Weber 2021-01-20 15:17:51 -05:00 committed by Andreas Kling
parent 57ca15f126
commit 65570216b4
Notes: sideshowbarker 2024-07-18 23:01:46 +09:00

View file

@ -37,6 +37,16 @@
# include <serenity.h>
#endif
#if defined(__linux__) && !defined(MFD_CLOEXEC)
# include <linux/memfd.h>
# include <sys/syscall.h>
static int memfd_create(const char* name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
#endif
namespace Core {
AnonymousBuffer AnonymousBuffer::create_with_size(size_t size)