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