diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | darwin-config.h | 2 | ||||
-rw-r--r-- | includes/Exceptions.h | 1 | ||||
m--------- | libeio | 0 | ||||
-rw-r--r-- | src/Socket.cc | 3 | ||||
-rw-r--r-- | tests/test-Threads.cc | 1 |
6 files changed, 11 insertions, 4 deletions
@@ -27,12 +27,14 @@ INCLUDES = includes libcoro libeio libev LIBS = ifeq ($(SYSTEM),Darwin) + CC = clang + CXX = clang++ CPPFLAGS += -fPIC LDFLAGS += -fPIC LIBS += pthread iconv CONFIG_H = darwin-config.h ARCH_FLAGS = -arch i386 - LD = g++ -arch i386 + LD = clang++ -arch i386 STRIP = strip -x ifeq ($(TRUESYSTEM),Linux) CROSSCOMPILE = true @@ -190,10 +192,10 @@ libBalau.a: $(BALAU_OBJECTS) dep: $(ALL_DEPS) %.dep : %.cc - $(CXX) $(CXXFLAGS) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + $(CXX) $(CXXFLAGS) $(CPPFLAGS_NO_ARCH) -M $< > $@ %.dep : %.c - $(CC) $(CFLAGS) $(CPPFLAGS_NO_ARCH) -M -MF $@ $< + $(CC) $(CFLAGS) $(CPPFLAGS_NO_ARCH) -M $< > $@ -include $(ALL_DEPS) diff --git a/darwin-config.h b/darwin-config.h index b37d5b5..63f568a 100644 --- a/darwin-config.h +++ b/darwin-config.h @@ -27,3 +27,5 @@ #define HAVE_POLL_H 1 #define HAVE_SYS_EVENT_H 1 #define HAVE_SYS_SELECT_H 1 + +#define __i386__ 1
\ No newline at end of file diff --git a/includes/Exceptions.h b/includes/Exceptions.h index b6730c1..e17e468 100644 --- a/includes/Exceptions.h +++ b/includes/Exceptions.h @@ -1,5 +1,6 @@ #pragma once +#include <typeinfo> #include <cxxabi.h> #include <BString.h> diff --git a/libeio b/libeio -Subproject a7fb04fdd2397af195ab09afd57372a30ba85de +Subproject f6a4a63e6978359f5742136c28a6412f4e0979a 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; diff --git a/tests/test-Threads.cc b/tests/test-Threads.cc index daebf5f..82bc9ec 100644 --- a/tests/test-Threads.cc +++ b/tests/test-Threads.cc @@ -12,6 +12,7 @@ class TestThread : public Thread { void * TestThread::proc() { Printer::log(M_STATUS, "Into a thread"); + return NULL; } void MainTask::Do() { |