aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-uds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/assuan-uds.c')
-rw-r--r--src/assuan-uds.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/assuan-uds.c b/src/assuan-uds.c
index f31ee36..02f77a5 100644
--- a/src/assuan-uds.c
+++ b/src/assuan-uds.c
@@ -63,25 +63,6 @@
#endif /*USE_DESCRIPTOR_PASSING*/
-#ifdef HAVE_W32_SYSTEM
-int
-wsa2errno (int err)
-{
- switch (err)
- {
- case WSAENOTSOCK:
- return EINVAL;
- case WSAEWOULDBLOCK:
- return EAGAIN;
- case ERROR_BROKEN_PIPE:
- return EPIPE;
- default:
- return EIO;
- }
-}
-#endif
-
-
/* Read from a unix domain socket using sendmsg.
FIXME: We don't need the buffering. It is a leftover from the time
@@ -173,7 +154,7 @@ uds_reader (assuan_context_t ctx, void *buf, size_t buflen)
#else /*HAVE_W32_SYSTEM*/
int res = recvfrom (HANDLE2SOCKET(ctx->inbound.fd), buf, buflen, 0, NULL, NULL);
if (res < 0)
- errno = wsa2errno (WSAGetLastError ());
+ errno = _assuan_sock_wsa2errno (WSAGetLastError ());
return res;
#endif /*HAVE_W32_SYSTEM*/
}
@@ -205,7 +186,7 @@ uds_writer (assuan_context_t ctx, const void *buf, size_t buflen)
(struct sockaddr *)&ctx->serveraddr,
sizeof (struct sockaddr_in));
if (res < 0)
- errno = wsa2errno (WSAGetLastError ());
+ errno = _assuan_sock_wsa2errno (WSAGetLastError ());
return res;
#endif /*HAVE_W32_SYSTEM*/
}