summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2003-01-02 04:05:20 +0000
committerdinoex <dinoex@FreeBSD.org>2003-01-02 04:05:20 +0000
commit89a0a7629e0a81324af9609947842373cc4ac81d (patch)
tree1dbab7257d95fe60c07f88907c7dbd5f48880310
parent209ada3f757ddfe0c3c9378be731110a6b7f5e72 (diff)
downloadFreeBSD-ports-89a0a7629e0a81324af9609947842373cc4ac81d.zip
FreeBSD-ports-89a0a7629e0a81324af9609947842373cc4ac81d.tar.gz
- make socks-patch portable
-rw-r--r--net-im/licq/files/patch-socket.cpp20
-rw-r--r--net/licq/files/patch-socket.cpp20
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 <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);
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 <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);
OpenPOWER on IntegriCloud