aboutsummaryrefslogtreecommitdiff
path: root/lib/roken/net_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roken/net_write.c')
-rw-r--r--lib/roken/net_write.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/roken/net_write.c b/lib/roken/net_write.c
index 1e8361999ea8..e66f56b75952 100644
--- a/lib/roken/net_write.c
+++ b/lib/roken/net_write.c
@@ -71,7 +71,7 @@ net_write (rk_socket_t fd, const void *buf, size_t nbytes)
return nbytes;
}
-#else
+#else /* defined(_WIN32) */
ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
net_write(rk_socket_t sock, const void *buf, size_t nbytes)
@@ -102,6 +102,7 @@ net_write(rk_socket_t sock, const void *buf, size_t nbytes)
count = send (sock, cbuf, rem, 0);
#endif
if (count < 0) {
+#ifdef SOCKET_IS_NOT_AN_FD
if (!use_write) {
switch (rk_SOCK_ERRNO) {
case WSAEINTR:
@@ -111,7 +112,9 @@ net_write(rk_socket_t sock, const void *buf, size_t nbytes)
default:
return count;
}
- } else {
+ } else
+#endif
+ {
switch (errno) {
case EINTR:
continue;