From 49ac990a1e36d7868eed119efa93ed95edbecc79 Mon Sep 17 00:00:00 2001 From: green Date: Mon, 21 Feb 2000 05:50:53 +0000 Subject: Try to fix socklen_t/int breakage for older 4.0s and for -STABLEs. --- net/licq-devel/files/patch-ad | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 net/licq-devel/files/patch-ad (limited to 'net/licq-devel') diff --git a/net/licq-devel/files/patch-ad b/net/licq-devel/files/patch-ad new file mode 100644 index 0000000..c2a3938 --- /dev/null +++ b/net/licq-devel/files/patch-ad @@ -0,0 +1,34 @@ +--- src/daemon/socket.cpp.orig Mon Feb 21 00:34:58 2000 ++++ src/daemon/socket.cpp Mon Feb 21 00:43:15 2000 +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #ifndef MSG_DONTWAIT + #define MSG_DONTWAIT 0 +@@ -244,7 +245,11 @@ + if (_nFlags & ADDR_LOCAL) + { + // Setup the local structure ++#if __FreeBSD_version < 400013 ++ int sizeofSockaddr = sizeof(struct sockaddr_in); ++#else + socklen_t sizeofSockaddr = sizeof(struct sockaddr_in); ++#endif + if (getsockname(m_nDescriptor, (struct sockaddr *)&m_sLocalAddr, &sizeofSockaddr) < 0) + { + // errno has been set +@@ -480,7 +485,11 @@ + *---------------------------------------------------------------------------*/ + void TCPSocket::RecvConnection(TCPSocket &newSocket) + { ++#if __FreeBSD_version < 400013 ++ int sizeofSockaddr = sizeof(struct sockaddr_in); ++#else + socklen_t sizeofSockaddr = sizeof(struct sockaddr_in); ++#endif + newSocket.m_nDescriptor = accept(m_nDescriptor, (struct sockaddr *)&newSocket.m_sRemoteAddr, &sizeofSockaddr); + newSocket.OpenSocket(); + newSocket.SetAddrsFromSocket(ADDR_LOCAL | ADDR_REMOTE); -- cgit v1.1