Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f2b7d4

Browse filesBrowse files
danmcdRafaelGSS
authored andcommitted
deps: support madvise(3C) across ALL illumos revisions
In illumos, madvise(3C) now takes `void *` for its first argument post-illumos#14418, but uses `caddr_t` pre-illumos#14418. This fix will detect if the illumos mman.h file in use is pre-or-post-illumos#14418 so builds can work either way. PR-URL: #61898 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> (cherry picked from commit 2bae6ac)
1 parent 947ec32 commit 9f2b7d4
Copy full SHA for 9f2b7d4

2 files changed

+14-2Lines changed: 14 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.4',
41+
'v8_embedder_string': '-node.5',
4242

4343
##### V8 defaults for Node.js #####
4444

Collapse file

‎deps/v8/src/base/platform/platform-posix.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/base/platform/platform-posix.cc
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,19 @@
8282
#define MAP_ANONYMOUS MAP_ANON
8383
#endif
8484

85-
#if defined(V8_OS_SOLARIS)
85+
/*
86+
* NOTE: illumos starting with illumos#14418 (pushed April 20th, 2022)
87+
* prototypes madvise(3C) properly with a `void *` first argument.
88+
* The only way to detect this outside of configure-time checking is to
89+
* check for the existence of MEMCNTL_SHARED, which gets defined for the first
90+
* time in illumos#14418 under the same circumstances save _STRICT_POSIX, which
91+
* thankfully neither Solaris nor illumos builds of Node or V8 do.
92+
*
93+
* If some future illumos push changes the MEMCNTL_SHARED assumptions made
94+
* above, the illumos check below will have to be revisited. This check
95+
* will work on both pre-and-post illumos#14418 illumos environments.
96+
*/
97+
#if defined(V8_OS_SOLARIS) && !(defined(__illumos__) && defined(MEMCNTL_SHARED))
8698
#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
8799
extern "C" int madvise(caddr_t, size_t, int);
88100
#else

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.