aboutsummaryrefslogtreecommitdiff
path: root/win32/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/net.c')
-rw-r--r--win32/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/net.c b/win32/net.c
index 05df6d20e..2341119b0 100644
--- a/win32/net.c
+++ b/win32/net.c
@@ -37,7 +37,7 @@ int mingw_socket(int domain, int type, int protocol)
37 return -1; 37 return -1;
38 } 38 }
39 /* convert into a file descriptor */ 39 /* convert into a file descriptor */
40 if ((sockfd = _open_osfhandle(s, O_RDWR|O_BINARY)) < 0) { 40 if ((sockfd = _open_osfhandle((intptr_t)s, O_RDWR|O_BINARY)) < 0) {
41 closesocket(s); 41 closesocket(s);
42 bb_error_msg("unable to make a socket file descriptor: %s", 42 bb_error_msg("unable to make a socket file descriptor: %s",
43 strerror(errno)); 43 strerror(errno));
@@ -90,7 +90,7 @@ int mingw_accept(int sockfd1, struct sockaddr *sa, socklen_t *sz)
90 SOCKET s2 = accept(s1, sa, sz); 90 SOCKET s2 = accept(s1, sa, sz);
91 91
92 /* convert into a file descriptor */ 92 /* convert into a file descriptor */
93 if ((sockfd2 = _open_osfhandle(s2, O_RDWR|O_BINARY)) < 0) { 93 if ((sockfd2 = _open_osfhandle((intptr_t)s2, O_RDWR|O_BINARY)) < 0) {
94 int err = errno; 94 int err = errno;
95 closesocket(s2); 95 closesocket(s2);
96 bb_error_msg("unable to make a socket file descriptor: %s", 96 bb_error_msg("unable to make a socket file descriptor: %s",