mirror of
https://github.com/bytedance/g3.git
synced 2026-05-04 14:40:40 +00:00
21 lines
326 B
C
21 lines
326 B
C
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __GLIBC__
|
|
|
|
#if !__GLIBC_PREREQ(2, 27)
|
|
|
|
#include <sys/mman.h>
|
|
#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
|
|
extern int memfd_create(const char *name, unsigned int flags);
|
|
|
|
int memfd_create(const char* name, unsigned int flags)
|
|
{
|
|
return syscall(SYS_memfd_create, name, flags);
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|