diff options
Diffstat (limited to 'tests/setsockopt.c')
| -rw-r--r-- | tests/setsockopt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/setsockopt.c b/tests/setsockopt.c index 42cc3dcc..b58db1f9 100644 --- a/tests/setsockopt.c +++ b/tests/setsockopt.c @@ -1,6 +1,6 @@ /* setsockopt.c --- wrappers for Windows setsockopt function - Copyright (C) 2008-2024 Free Software Foundation, Inc. + Copyright (C) 2008-2026 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -35,8 +35,6 @@ int rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) { SOCKET sock = FD_TO_SOCKET (fd); - int r; - if (sock == INVALID_SOCKET) { errno = EBADF; @@ -44,6 +42,8 @@ rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t op } else { + int r; + if (level == SOL_SOCKET && (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)) { |
