Explicitly set errno to ENOTSUP on unsupported OS's

This commit is contained in:
michael-grunder 2023-05-31 11:15:36 -07:00
parent 3f503b6f2b
commit d37d592f5b

1
net.c
View File

@ -234,6 +234,7 @@ int redisContextSetTcpUserTimeout(redisContext *c, unsigned int timeout) {
res = setsockopt(c->fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, sizeof(timeout));
#else
res = -1;
errno = ENOTSUP;
(void)timeout;
#endif
if (res == -1) {