Explicitly set errno to ENOTSUP on unsupported OS's
This commit is contained in:
parent
3f503b6f2b
commit
d37d592f5b
1
net.c
1
net.c
@ -234,6 +234,7 @@ int redisContextSetTcpUserTimeout(redisContext *c, unsigned int timeout) {
|
|||||||
res = setsockopt(c->fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, sizeof(timeout));
|
res = setsockopt(c->fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, sizeof(timeout));
|
||||||
#else
|
#else
|
||||||
res = -1;
|
res = -1;
|
||||||
|
errno = ENOTSUP;
|
||||||
(void)timeout;
|
(void)timeout;
|
||||||
#endif
|
#endif
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user