From 162525457320b5dba9a4e736759f840757635231 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 18 Jul 2007 07:17:10 +0000 Subject: Incorporated a patch contributed by Brandon CS Sanders that allows libbu++ to compile under OSX. So far, no problems with anything else, it looks like build and nango both build without problems, libbu++ is truly becoming a full cross- platform toolkit. --- src/serversocket.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/serversocket.cpp') diff --git a/src/serversocket.cpp b/src/serversocket.cpp index 1424630..010c562 100644 --- a/src/serversocket.cpp +++ b/src/serversocket.cpp @@ -13,6 +13,7 @@ #include #include "serversocket.h" #include "exceptions.h" +#include "osx_compatibility.h" Bu::ServerSocket::ServerSocket( int nPort, int nPoolSize ) : nPort( nPort ) @@ -117,9 +118,13 @@ int Bu::ServerSocket::accept( int nTimeoutSec, int nTimeoutUSec ) nClient = ::accept( nServer, (struct sockaddr *)&clientname, (int *)&size ); -#else - nClient = ::accept( nServer, (struct sockaddr *)&clientname, &size ); -#endif +#else /* not-cygwin */ +#ifdef __APPLE__ + nClient = ::accept( nServer, (struct sockaddr *)&clientname, (socklen_t*)&size ); +#else /* linux */ + nClient = ::accept( nServer, (struct sockaddr *)&clientname, &size ); +#endif /* __APPLE__ */ +#endif /* __CYGWIN__ */ if( nClient < 0 ) { throw SocketException( -- cgit v1.2.3