Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-03-18 16:20:00 +0300
committerMichaël Zasso <targos@protonmail.com>2022-04-12 23:10:05 +0300
commit64a63285056af9a8cf1e2750f420026119e6b9b0 (patch)
tree6d1e0b5538c9457ab96c7c262b4cbbed3d871813 /deps
parentfde59217b9aff04f3e6e75326693ec2ec59e3f9e (diff)
deps: make V8 compilable with older glibc
Remove call to `memfd_create`. The function that references it is only used for V8 testing. PR-URL: https://github.com/nodejs/node/pull/42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/base/platform/platform-posix.cc18
1 files changed, 0 insertions, 18 deletions
diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc
index 280d7f88f83..664ed301c87 100644
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -581,25 +581,7 @@ void OS::FreeAddressSpaceReservation(AddressSpaceReservation reservation) {
// Need to disable CFI_ICALL due to the indirect call to memfd_create.
DISABLE_CFI_ICALL
PlatformSharedMemoryHandle OS::CreateSharedMemoryHandleForTesting(size_t size) {
-#if V8_OS_LINUX && !V8_OS_ANDROID
- // Use memfd_create if available, otherwise mkstemp.
- using memfd_create_t = int (*)(const char*, unsigned int);
- memfd_create_t memfd_create =
- reinterpret_cast<memfd_create_t>(dlsym(RTLD_DEFAULT, "memfd_create"));
- int fd = -1;
- if (memfd_create) {
- fd = memfd_create("V8MemFDForTesting", MFD_CLOEXEC);
- } else {
- char filename[] = "/tmp/v8_tmp_file_for_testing_XXXXXX";
- fd = mkstemp(filename);
- if (fd != -1) CHECK_EQ(0, unlink(filename));
- }
- if (fd == -1) return kInvalidSharedMemoryHandle;
- CHECK_EQ(0, ftruncate(fd, size));
- return SharedMemoryHandleFromFileDescriptor(fd);
-#else
return kInvalidSharedMemoryHandle;
-#endif
}
// static