diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2003-01-02 04:05:20 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2003-01-02 04:05:20 +0000 |
commit | 4da2b132047e1ece00728bbb794ba38fb62dd377 (patch) | |
tree | 9a7de2c0187da8787ee275f0e6278636d04f717a /net | |
parent | 56eeb6e4e992e2b291bbe30f9ce679ec4ccf7a6b (diff) | |
download | ports-4da2b132047e1ece00728bbb794ba38fb62dd377.tar.gz ports-4da2b132047e1ece00728bbb794ba38fb62dd377.zip |
- make socks-patch portable
Notes
Notes:
svn path=/head/; revision=72133
Diffstat (limited to 'net')
-rw-r--r-- | net/licq/files/patch-socket.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/net/licq/files/patch-socket.cpp b/net/licq/files/patch-socket.cpp index 4d39b2ff7103..352f77ab89ae 100644 --- a/net/licq/files/patch-socket.cpp +++ b/net/licq/files/patch-socket.cpp @@ -1,27 +1,29 @@ ---- src/socket.cpp.orig Tue Jul 23 12:22:13 2002 -+++ src/socket.cpp Thu Aug 8 03:07:32 2002 -@@ -13,6 +13,7 @@ +--- src/socket.cpp.orig Tue Jul 23 07:22:13 2002 ++++ src/socket.cpp Mon Dec 16 19:21:03 2002 +@@ -13,6 +13,9 @@ #include <netdb.h> #include <fcntl.h> #include <unistd.h> ++#ifdef __FreeBSD__ +#include <osreldate.h> ++#endif #ifdef HAVE_INET_ATON #include <arpa/inet.h> -@@ -304,6 +305,8 @@ +@@ -304,6 +307,8 @@ // Setup the local structure #ifdef USE_SOCKS5 int sizeofSockaddr = sizeof(struct sockaddr_in); -+#elif __FreeBSD_version < 400013 ++#elif defined(__FreeBSD__) && __FreeBSD_version < 400013 + int sizeofSockaddr = sizeof(struct sockaddr_in); #else socklen_t sizeofSockaddr = sizeof(struct sockaddr_in); #endif -@@ -416,7 +419,11 @@ +@@ -416,7 +421,11 @@ m_sRemoteAddr.sin_family = AF_INET; // if connect fails then call CloseConnection to clean up before returning -+#if __FreeBSD_version < 400013 ++#if defined(__FreeBSD__) && __FreeBSD_version < 400013 + int sizeofSockaddr = sizeof(struct sockaddr); +#else socklen_t sizeofSockaddr = sizeof(struct sockaddr); @@ -29,12 +31,12 @@ if (connect(m_nDescriptor, (struct sockaddr *)&m_sRemoteAddr, sizeofSockaddr) < 0) { // errno has been set -@@ -691,6 +698,8 @@ +@@ -691,6 +700,8 @@ void TCPSocket::RecvConnection(TCPSocket &newSocket) { #ifdef USE_SOCKS5 + int sizeofSockaddr = sizeof(struct sockaddr_in); -+#elif __FreeBSD_version < 400013 ++#elif defined(__FreeBSD__) && __FreeBSD_version < 400013 int sizeofSockaddr = sizeof(struct sockaddr_in); #else socklen_t sizeofSockaddr = sizeof(struct sockaddr_in); |