diff options
-rw-r--r-- | src/Utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Utils.c b/src/Utils.c index 573ab1f..ffa4d3a 100644 --- a/src/Utils.c +++ b/src/Utils.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #ifdef HAVE_NETDB_H #include <netdb.h> @@ -67,7 +68,6 @@ CCTK_FILEVERSION(CactusConnect_Socket_Utils_c) #endif #ifdef SOCKET_HAVE_UNIX_SOCKETS -#include <errno.h> #define IOCTL_SOCKET(a, b, c) ioctl(a, b, c) #else #define errno WSAGetLastError() @@ -366,11 +366,13 @@ int Socket_TCPBlockingWrite (SOCKET s, const char *buffer, int buflen) perror("an io error occured"); #endif break; +#ifdef EWOULDBLOCK case EWOULDBLOCK: #ifdef PERRORS perror("Non-blocking I/O is specified by ioctl"); perror("but socket has no data (would have blocked)."); #endif +#endif break; } } @@ -420,11 +422,13 @@ int Socket_TCPBlockingRead(SOCKET s,char *buffer, int buflen) perror("disable signals and try again"); #endif break; +#ifdef EWOULDBLOCK case EWOULDBLOCK: #ifdef PERRORS perror("Non-blocking I/O is specified by ioctl"); perror("but socket has no data (would have blocked)."); #endif +#endif break; } } |