aboutsummaryrefslogtreecommitdiff
path: root/src/serversocket.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-07-18 07:17:10 +0000
committerMike Buland <eichlan@xagasoft.com>2007-07-18 07:17:10 +0000
commit162525457320b5dba9a4e736759f840757635231 (patch)
treeb00464b34a924f41622bebef4fa3b72750744bd6 /src/serversocket.cpp
parentd7ea32daa44c9e0cc4ac00a69168b4e1d182082b (diff)
downloadlibbu++-162525457320b5dba9a4e736759f840757635231.tar.gz
libbu++-162525457320b5dba9a4e736759f840757635231.tar.bz2
libbu++-162525457320b5dba9a4e736759f840757635231.tar.xz
libbu++-162525457320b5dba9a4e736759f840757635231.zip
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.
Diffstat (limited to 'src/serversocket.cpp')
-rw-r--r--src/serversocket.cpp11
1 files changed, 8 insertions, 3 deletions
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 @@
13#include <fcntl.h> 13#include <fcntl.h>
14#include "serversocket.h" 14#include "serversocket.h"
15#include "exceptions.h" 15#include "exceptions.h"
16#include "osx_compatibility.h"
16 17
17Bu::ServerSocket::ServerSocket( int nPort, int nPoolSize ) : 18Bu::ServerSocket::ServerSocket( int nPort, int nPoolSize ) :
18 nPort( nPort ) 19 nPort( nPort )
@@ -117,9 +118,13 @@ int Bu::ServerSocket::accept( int nTimeoutSec, int nTimeoutUSec )
117 nClient = ::accept( nServer, (struct sockaddr *)&clientname, 118 nClient = ::accept( nServer, (struct sockaddr *)&clientname,
118 (int *)&size 119 (int *)&size
119 ); 120 );
120#else 121#else /* not-cygwin */
121 nClient = ::accept( nServer, (struct sockaddr *)&clientname, &size ); 122#ifdef __APPLE__
122#endif 123 nClient = ::accept( nServer, (struct sockaddr *)&clientname, (socklen_t*)&size );
124#else /* linux */
125 nClient = ::accept( nServer, (struct sockaddr *)&clientname, &size );
126#endif /* __APPLE__ */
127#endif /* __CYGWIN__ */
123 if( nClient < 0 ) 128 if( nClient < 0 )
124 { 129 {
125 throw SocketException( 130 throw SocketException(