fix undefined FIONREAD error on Cygwin

pull/193/head
Chris Conlon 2019-08-30 11:55:51 -06:00
parent ef2a6e15c6
commit f88dc8c98b
1 changed files with 5 additions and 1 deletions

View File

@ -607,10 +607,14 @@ extern "C" {
#elif defined(USE_WINDOWS_API) #elif defined(USE_WINDOWS_API)
#define WIOCTL ioctlsocket #define WIOCTL ioctlsocket
#else #else
#if defined(__CYGWIN__) && !defined(FIONREAD)
/* Cygwin defines FIONREAD in socket.h instead of ioctl.h */
#include <sys/socket.h>
#endif
#include <sys/ioctl.h> #include <sys/ioctl.h>
#define WIOCTL ioctl #define WIOCTL ioctl
#endif #endif
#endif #endif /* WIOCTL */
#if defined(USE_WINDOWS_API) #if defined(USE_WINDOWS_API)