mirror of
https://github.com/denoland/deno.git
synced 2025-03-11 22:59:41 -04:00

- upgrade v8 to 13.4 - turbocall conversion for arraybuffers is now much more complex, so use cranelift - misc updates for deprecated fns - v8 default stack size is too small now, causing stack overflow exceptions in some tests - add syscall shim to support new syscall in old sysroot
26 lines
671 B
C
26 lines
671 B
C
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
|
|
#define _GNU_SOURCE
|
|
#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
#ifndef SYS_memfd_create
|
|
# if defined(__x86_64__)
|
|
# define SYS_memfd_create 319
|
|
# elif defined(__aarch64__)
|
|
# define SYS_memfd_create 279
|
|
# elif defined(__arm__)
|
|
# define SYS_memfd_create 385
|
|
# elif defined(__i386__)
|
|
# define SYS_memfd_create 356
|
|
# elif defined(__powerpc64__)
|
|
# define SYS_memfd_create 360
|
|
# else
|
|
# error "memfd_create syscall number unknown for this architecture"
|
|
# endif
|
|
#endif
|
|
|
|
int memfd_create(const char *name, unsigned int flags) {
|
|
return syscall(SYS_memfd_create, name, flags);
|
|
}
|