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>
This commit is contained in:
Corinna Vinschen 2016-07-01 16:56:07 +02:00
parent e27cfa4631
commit 29600e04e3
1 changed files with 2 additions and 1 deletions

View File

@ -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;