diff --git a/wolfssh/port.h b/wolfssh/port.h index 628d0e6..5cb2c37 100644 --- a/wolfssh/port.h +++ b/wolfssh/port.h @@ -607,10 +607,14 @@ extern "C" { #elif defined(USE_WINDOWS_API) #define WIOCTL ioctlsocket #else + #if defined(__CYGWIN__) && !defined(FIONREAD) + /* Cygwin defines FIONREAD in socket.h instead of ioctl.h */ + #include + #endif #include #define WIOCTL ioctl #endif -#endif +#endif /* WIOCTL */ #if defined(USE_WINDOWS_API)