summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-07-01 16:56:07 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-07-01 16:56:07 +0200
commit29600e04e3408a83e4989d9ebce7f80ff3aaea61 (patch)
treeff880274f0bb44a5e8d17acc13ae00fd93848db9
parente27cfa4631e9ff7ead7b417e87d160cc20c9d03e (diff)
downloadcygnal-29600e04e3408a83e4989d9ebce7f80ff3aaea61.tar.gz
cygnal-29600e04e3408a83e4989d9ebce7f80ff3aaea61.tar.bz2
cygnal-29600e04e3408a83e4989d9ebce7f80ff3aaea61.zip
Make sure to use the Winsock definition of FIONREAD in ioctlsocket call
Commit b1b46d45 introduced a regression. After redefining FIONREAD as part of restructuring newlib/Cygwin headers, the call to ioctlsocket in the FIONREAD branch of fhandler_socket::ioctl should have been changed to use the Winsock definition of FIONREAD, which I neglected. This only affects 64 bit Cygwin. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/fhandler_socket.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 71a7bdc53..9ada4697d 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -2259,7 +2259,8 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
#ifdef __x86_64__
case _IOR('f', 127, u_long):
#endif
- res = ioctlsocket (get_socket (), FIONREAD, (u_long *) p);
+ /* Make sure to use the Winsock definition of FIONREAD. */
+ res = ioctlsocket (get_socket (), _IOR('f', 127, u_long), (u_long *) p);
if (res == SOCKET_ERROR)
set_winsock_errno ();
break;