From 89a0a7629e0a81324af9609947842373cc4ac81d Mon Sep 17 00:00:00 2001 From: dinoex Date: Thu, 2 Jan 2003 04:05:20 +0000 Subject: - make socks-patch portable --- net-im/licq/files/patch-socket.cpp | 20 +++++++++++--------- net/licq/files/patch-socket.cpp | 20 +++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/net-im/licq/files/patch-socket.cpp b/net-im/licq/files/patch-socket.cpp index 4d39b2f..352f77a 100644 --- a/net-im/licq/files/patch-socket.cpp +++ b/net-im/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 #include #include ++#ifdef __FreeBSD__ +#include ++#endif #ifdef HAVE_INET_ATON #include -@@ -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); diff --git a/net/licq/files/patch-socket.cpp b/net/licq/files/patch-socket.cpp index 4d39b2f..352f77a 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 #include #include ++#ifdef __FreeBSD__ +#include ++#endif #ifdef HAVE_INET_ATON #include -@@ -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); -- cgit v1.1