GeezerVison is showing github.com — deps: support madvise(3C) across ALL illumos revisions · nodejs/node@72d719d
File tree
Expand file treeCollapse file tree
Open diff view settings
deps/v8/src/base/platform
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: common.gypi +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
38 | 38 |
|
39 | 39 | # Reset this number to 0 on major V8 upgrades. |
40 | 40 | # Increment by one for each non-official patch applied to deps/v8. |
41 | | - 'v8_embedder_string': '-node.5', |
| 41 | + 'v8_embedder_string': '-node.6', |
42 | 42 |
|
43 | 43 | ##### V8 defaults for Node.js ##### |
44 | 44 |
|
|
Collapse file
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 number | Diff line number | Diff line change |
|---|
|
82 | 82 | #define MAP_ANONYMOUS MAP_ANON |
83 | 83 | #endif |
84 | 84 |
|
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)) |
86 | 98 | #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) |
87 | 99 | extern "C" int madvise(caddr_t, size_t, int); |
88 | 100 | #else |
|