summaryrefslogtreecommitdiff
path: root/sockcompat.c
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2020-04-02 11:20:56 -0700
committermichael-grunder <michael.grunder@gmail.com>2020-04-02 11:38:04 -0700
commitec18d790f165da1b2e7528828518a3034aa74b9c (patch)
tree31542ad00ad7b19631a3eb10ef87ff15516f658b /sockcompat.c
parenta1405e172a3c57cb18e506afeb681551dce02620 (diff)
Const correctness
Fixes #778
Diffstat (limited to 'sockcompat.c')
-rw-r--r--sockcompat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sockcompat.c b/sockcompat.c
index 4cc2f41..f99d14b 100644
--- a/sockcompat.c
+++ b/sockcompat.c
@@ -212,7 +212,7 @@ int win32_getsockopt(SOCKET sockfd, int level, int optname, void *optval, sockle
int win32_setsockopt(SOCKET sockfd, int level, int optname, const void *optval, socklen_t optlen) {
int ret = 0;
if ((level == SOL_SOCKET) && ((optname == SO_RCVTIMEO) || (optname == SO_SNDTIMEO))) {
- struct timeval *tv = optval;
+ const struct timeval *tv = optval;
DWORD timeout = tv->tv_sec * 1000 + tv->tv_usec / 1000;
ret = setsockopt(sockfd, level, optname, (const char*)&timeout, sizeof(DWORD));
} else {