From 1f36b01ed04354f5eb923f504411c5da364da968 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 9 Oct 2024 09:52:00 +0200 Subject: [PATCH] unix: fix uv_tcp_keepalive in smartOS (#4570) Make sure `UV__SOLARIS_11_4` is not set for `smartOS`/`illumOS`. In our codebase is used only twice: - Detect correct implementation of `SO_REUSEPORT`, which is not even implemented on `illumOS`. - Detect the time unit used for the TCP keepalive options. If set to `0`, which was the case for `illumOS`, it chose milliseconds, which is not correct for `illumOS` either as it uses seconds. --- src/unix/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/internal.h b/src/unix/internal.h index 138685c9..568a55b5 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -496,7 +496,7 @@ typedef struct { int uv__get_constrained_cpu(uv__cpu_constraint* constraint); #endif -#ifdef __sun +#if defined(__sun) && !defined(__illumos__) #ifdef SO_FLOW_NAME /* Since it's impossible to detect the Solaris 11.4 version via OS macros, * so we check the presence of the socket option SO_FLOW_NAME that was first