Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
d37d592f
Commit
d37d592f
authored
May 31, 2023
by
michael-grunder
Browse files
Explicitly set errno to ENOTSUP on unsupported OS's
parent
3f503b6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
net.c
View file @
d37d592f
...
@@ -234,6 +234,7 @@ int redisContextSetTcpUserTimeout(redisContext *c, unsigned int timeout) {
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment