From 57d2d5a19c67112e2e416f534a6ac32618c8d0de Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 13 Feb 2013 20:08:30 +0100 Subject: [PATCH] fixed missing include for non-blocking connects --- src/IOHandler.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.20.1