]> git.meshlink.io Git - catta/blobdiff - src/compat/windows/wincompat.h
add ioctl as a wrapper around ioctlsocket
[catta] / src / compat / windows / wincompat.h
index f76dbc4835a1012160d863060f2928dda145ce82..b5020226a8e5465ea406bc56105e3d61a7fdd0c9 100644 (file)
@@ -77,6 +77,12 @@ ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
 #endif
 
 
+// Windows doesn't have ioctl but offers ioctlsocket for some socket-related
+// functions. Unfortunately, argument types differ, so we implement a
+// (restricted) wrapper.
+int ioctl(int d, unsigned long request, int *p);
+
+
 // Windows logically doesn't have uname, so we supply a replacement.
 
 struct utsname {