projects
/
IOMultiplexer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f83bd22
)
fixed missing include for non-blocking connects
author
pk910
<philipp@zoelle1.de>
Wed, 13 Feb 2013 19:08:30 +0000
(20:08 +0100)
committer
pk910
<philipp@zoelle1.de>
Wed, 13 Feb 2013 19:17:29 +0000
(20:17 +0100)
src/IOHandler.c
patch
|
blob
|
history
diff --git
a/src/IOHandler.c
b/src/IOHandler.c
index b2a391bf11e68388112f107a56747f84f6e8cde2..e710ffe88022a21c233ead04551e9ba6fa168f6a 100644
(file)
--- a/
src/IOHandler.c
+++ b/
src/IOHandler.c
@@
-34,6
+34,7
@@
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#include <fcntl.h>
#endif
#ifndef EWOULDBLOCK
#endif
#ifndef EWOULDBLOCK
@@
-408,11
+409,11
@@
struct IODescriptor *iohandler_connect_flags(const char *hostname, unsigned int
//make sockfd unblocking
#if defined(F_GETFL)
{
//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 f
cntl_f
lags;
+ f
cntl_f
lags = fcntl(sockfd, F_GETFL);
+ fcntl(sockfd, F_SETFL, f
cntl_f
lags|O_NONBLOCK);
+ f
cntl_f
lags = fcntl(sockfd, F_GETFD);
+ fcntl(sockfd, F_SETFD, f
cntl_f
lags|FD_CLOEXEC);
}
#else
/* I hope you're using the Win32 backend or something else that
}
#else
/* I hope you're using the Win32 backend or something else that