]> git.meshlink.io Git - catta/blobdiff - src/compat/windows/wincompat.c
make ioctl() work for setting values
[catta] / src / compat / windows / wincompat.c
index 890565bd2543cd11ba540e91f4f846e69271ad5f..98bc2d788aac5222f4007b8d7cb5e76fb7103a2a 100644 (file)
@@ -231,7 +231,7 @@ ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)
 
 int ioctl(int d, unsigned long request, int *p)
 {
-    u_long arg = 0;
+    u_long arg = *p;
 
     if(ioctlsocket(d, request, &arg) == SOCKET_ERROR) {
         errno = wsa_errno();