X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIOHandler.c;fp=src%2FIOHandler.c;h=e710ffe88022a21c233ead04551e9ba6fa168f6a;hp=b2a391bf11e68388112f107a56747f84f6e8cde2;hb=b017e062e97226e2e140d4a38751361e500fd8c4;hpb=1361faa990413b8f09967597ebe0a70dabeab0b3 diff --git a/src/IOHandler.c b/src/IOHandler.c index b2a391b..e710ffe 100644 --- a/src/IOHandler.c +++ b/src/IOHandler.c @@ -34,6 +34,7 @@ #include #include #include +#include #endif #ifndef EWOULDBLOCK @@ -408,11 +409,11 @@ struct IODescriptor *iohandler_connect_flags(const char *hostname, unsigned int //make sockfd unblocking #if defined(F_GETFL) { - int flags; - flags = fcntl(sockfd, F_GETFL); - fcntl(sockfd, F_SETFL, flags|O_NONBLOCK); - flags = fcntl(sockfd, F_GETFD); - fcntl(sockfd, F_SETFD, flags|FD_CLOEXEC); + int fcntl_flags; + fcntl_flags = fcntl(sockfd, F_GETFL); + fcntl(sockfd, F_SETFL, fcntl_flags|O_NONBLOCK); + fcntl_flags = fcntl(sockfd, F_GETFD); + fcntl(sockfd, F_SETFD, fcntl_flags|FD_CLOEXEC); } #else /* I hope you're using the Win32 backend or something else that