aboutsummaryrefslogtreecommitdiff
path: root/win32/net.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-05-25 08:58:07 +0100
committerRon Yorston <rmy@pobox.com>2016-05-25 08:58:07 +0100
commit204f9419baa815d3030ea618ddde5d05525c6c6c (patch)
tree01708b4a9c1fcee6e48dfb5545f38d96ef999f88 /win32/net.c
parent7ff0648275a752db9ab33c2e1708e475b5831675 (diff)
downloadbusybox-w32-204f9419baa815d3030ea618ddde5d05525c6c6c.tar.gz
busybox-w32-204f9419baa815d3030ea618ddde5d05525c6c6c.tar.bz2
busybox-w32-204f9419baa815d3030ea618ddde5d05525c6c6c.zip
win32: correct cast of argument to _open_osfhandle
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",