mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 20:37:26 +00:00
fixed bug #45135 getsockopt SO_SNDTIMEO, SO_RCVTIMEO broken
This commit is contained in:
parent
392ef77bc5
commit
b51805b87e
@ -176,7 +176,7 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t*
|
||||
#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) do { \
|
||||
s32_t loc = (val); \
|
||||
((struct timeval *)(optval))->tv_sec = (loc) / 1000U; \
|
||||
((struct timeval *)(optval))->tv_sec = ((loc) % 1000U) * 1000U; }while(0)
|
||||
((struct timeval *)(optval))->tv_usec = ((loc) % 1000U) * 1000U; }while(0)
|
||||
#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((struct timeval *)(optval))->tv_sec * 1000U) + (((struct timeval *)(optval))->tv_usec / 1000U))
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user