Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Duda <deo@logos-m.ru>2001-10-11 13:46:21 +0400
committerEgor Duda <deo@logos-m.ru>2001-10-11 13:46:21 +0400
commit5844588b7484d9af135f7cb3b3af3ae71ce85b7b (patch)
treeb0f0395cc1290b29c55d95f872ab3ba00ab4d55e /winsup/cygwin/net.cc
parentf6a85cddc845c72ed31295c5edbcc4dcb82b8dab (diff)
* net.cc (cygwin_sendto): Use correct socket address when sending
data to AF_UNIX socket.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 840ecc748..d32cfc1d9 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -625,7 +625,7 @@ cygwin_sendto (int fd,
{
debug_printf ("Fallback to winsock 1 sendto call");
if ((res = sendto (h->get_socket (), (const char *) buf, len, flags,
- to, tolen)) == SOCKET_ERROR)
+ (sockaddr *) &sin, tolen)) == SOCKET_ERROR)
{
set_winsock_errno ();
res = -1;
@@ -636,7 +636,7 @@ cygwin_sendto (int fd,
WSABUF wsabuf = { len, (char *) buf };
DWORD ret = 0;
if (WSASendTo (h->get_socket (), &wsabuf, 1, &ret, (DWORD)flags,
- to, tolen, ovr, NULL) != SOCKET_ERROR)
+ (sockaddr *) &sin, tolen, ovr, NULL) != SOCKET_ERROR)
res = ret;
else if ((res = WSAGetLastError ()) != WSA_IO_PENDING)
{