From f88dc8c98b774ef66a1768154885be78c94af4ae Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 30 Aug 2019 11:55:51 -0600 Subject: [PATCH] fix undefined FIONREAD error on Cygwin --- wolfssh/port.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)