Commit 39f36b55 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

su.c: do not cast to/from address to (void *) with win32 su_sendto()/su_recvfrom()

Patch from Mike Jerris.

parent 3a3d3b4e
......@@ -229,7 +229,7 @@ ssize_t su_sendto(su_socket_t s, void *buffer, size_t length, int flags,
if (length > INT_MAX)
length = INT_MAX;
return (ssize_t)sendto(s, buffer, (int)length, flags,
(void *)to, (int) tolen);
&to->su_sa, (int) tolen);
ssize_t su_recv(su_socket_t s, void *buffer, size_t length, int flags)
......@@ -252,7 +252,7 @@ ssize_t su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
length = INT_MAX;
retval = recvfrom(s, buffer, (int)length, flags,
(void *)from, fromlen ? &ilen : NULL);
&from->su_sa, fromlen ? &ilen : NULL);
if (fromlen)
*fromlen = ilen;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment