From e0add8d5cb4fdb408efda292f64e029aa7ebbad2 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 18 Oct 2011 09:35:45 -0700 Subject: Fixing Darwin compilation: -) Using clang instead of gcc for the native target (*sigh*) -) Fixing libeio (*sigh*) -) "Fixing" the connect() call in Sockets because Darwin is stupid (*SIIIIIIIGH*) Although the Threads unit test isn't working properly. --- src/Socket.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Socket.cc') diff --git a/src/Socket.cc b/src/Socket.cc index 65991a9..f14a8d3 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -390,7 +390,8 @@ bool Balau::Socket::connect(const char * hostname, int port) { do { Printer::elog(E_SOCKET, "Connecting now..."); - if (::connect(m_fd, (sockaddr *) &m_remoteAddr, sizeof(m_remoteAddr)) == 0) { + int r = ::connect(m_fd, (sockaddr *) &m_remoteAddr, sizeof(m_remoteAddr)); + if ((r == 0) || ((r < 0) && (errno == EISCONN))) { m_connected = true; m_connecting = false; -- cgit v1.2.3