Skip to content

Commit

Permalink
deps: make V8 compatible with older glibc
Browse files Browse the repository at this point in the history
Remove call to `memfd_create`.
The function that references it is only used for V8 testing.

Refs: #220
  • Loading branch information
targos authored and nodejs-github-bot committed Mar 9, 2022
1 parent 3128fe8 commit 3fa8644
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.6',
'v8_embedder_string': '-node.7',

##### V8 defaults for Node.js #####

Expand Down
8 changes: 0 additions & 8 deletions deps/v8/src/base/platform/platform-posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,15 +576,7 @@ void OS::FreeAddressSpaceReservation(AddressSpaceReservation reservation) {
#if !defined(V8_OS_MACOS)
// static
PlatformSharedMemoryHandle OS::CreateSharedMemoryHandleForTesting(size_t size) {
#if V8_OS_LINUX && !V8_OS_ANDROID
const char* name = "V8MemFDForTesting";
int fd = memfd_create(name, MFD_CLOEXEC);
if (fd == -1) return kInvalidSharedMemoryHandle;
CHECK_EQ(0, ftruncate(fd, size));
return SharedMemoryHandleFromFileDescriptor(fd);
#else
return kInvalidSharedMemoryHandle;
#endif
}

// static
Expand Down

0 comments on commit 3fa8644

Please sign in to comment.