freebsd-ports/net-im/licq/files/patch-ad
Brian Feldman 84a5ce14a5 Update to version 0.81. QT 2.1 (beta) is now needed. Thanks a bundle to
the submitter!!

Submitted by:	Matt Heckaman <matt@arpa.mail.net>
2000-04-01 05:21:42 +00:00

37 lines
1.3 KiB
Plaintext

--- src/daemon/socket.cpp.orig Wed Mar 29 01:30:14 2000
+++ src/daemon/socket.cpp Wed Mar 29 01:30:18 2000
@@ -12,6 +12,7 @@
#include <netdb.h>
#include <fcntl.h>
#include <unistd.h>
+#include <osreldate.h>
#ifndef MSG_DONTWAIT
#define MSG_DONTWAIT 0
@@ -260,7 +261,11 @@
if (_nFlags & ADDR_LOCAL)
{
// Setup the local structure
- socklen_t sizeofSockaddr = sizeof(struct sockaddr_in);
+ #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
@@ -498,7 +503,11 @@
*---------------------------------------------------------------------------*/
void TCPSocket::RecvConnection(TCPSocket &newSocket)
{
- socklen_t sizeofSockaddr = sizeof(struct sockaddr_in);
+ #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);