mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Fix compiler error in -current.
PR: 16443 Submitted by: Alexander Langer <alex@cichlids.com>
This commit is contained in:
parent
112745e296
commit
3649ada3e3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25314
50
net/libsocket++/files/patch-ad
Normal file
50
net/libsocket++/files/patch-ad
Normal file
@ -0,0 +1,50 @@
|
||||
--- sockstream.C.old Sat Jan 29 16:47:41 2000
|
||||
+++ sockstream.C Sun Jan 30 11:28:18 2000
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <sockstream.h>
|
||||
+#include <osreldate.h>
|
||||
|
||||
EXTERN_C_BEGIN
|
||||
#include <sys/time.h>
|
||||
@@ -275,8 +276,13 @@
|
||||
{
|
||||
int len = sa.size ();
|
||||
int soc = -1;
|
||||
+#if (__FreeBSD_version < 400013)
|
||||
while ((soc = ::accept (rep->sock, sa.addr (), &len)) == -1
|
||||
&& errno == EINTR)
|
||||
+#else
|
||||
+ while ((soc = ::accept (rep->sock, sa.addr (), (socklen_t *) &len)) == -1
|
||||
+ && errno == EINTR)
|
||||
+#endif
|
||||
errno = 0;
|
||||
if (soc == -1)
|
||||
error ("sockbuf::accept");
|
||||
@@ -321,8 +327,13 @@
|
||||
int rval;
|
||||
int sa_len = sa.size ();
|
||||
|
||||
+#if (__FreeBSD_version < 400013)
|
||||
if ((rval = ::recvfrom (rep->sock, (char*) buf, len,
|
||||
msgf, sa.addr (), &sa_len)) == -1)
|
||||
+#else
|
||||
+ if ((rval = ::recvfrom (rep->sock, (char*) buf, len,
|
||||
+ msgf, sa.addr (), (socklen_t *) &sa_len)) == -1)
|
||||
+#endif
|
||||
error ("sockbuf::recvfrom");
|
||||
return (rval==0) ? EOF: rval;
|
||||
}
|
||||
@@ -491,7 +502,11 @@
|
||||
int sockbuf::getopt (option op, void* buf, int len, level l) const
|
||||
{
|
||||
int rlen = len;
|
||||
+#if (__FreeBSD_version < 400013)
|
||||
if (::getsockopt (rep->sock, l, op, (char*) buf, &rlen) == -1)
|
||||
+#else
|
||||
+ if (::getsockopt (rep->sock, l, op, (char*) buf, (socklen_t *) &rlen) == -1)
|
||||
+#endif
|
||||
perror ("sockbuf::getopt");
|
||||
return rlen;
|
||||
}
|
34
net/libsocket++/files/patch-ae
Normal file
34
net/libsocket++/files/patch-ae
Normal file
@ -0,0 +1,34 @@
|
||||
--- sockinet.C.old Sat Jan 29 16:57:13 2000
|
||||
+++ sockinet.C Sun Jan 30 11:30:02 2000
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <sockinet.h>
|
||||
+#include <osreldate.h>
|
||||
|
||||
EXTERN_C_BEGIN
|
||||
#include <netdb.h>
|
||||
@@ -144,7 +145,11 @@
|
||||
{
|
||||
sockinetaddr sin;
|
||||
int len = sin.size();
|
||||
+#if (__FreeBSD_version < 400013)
|
||||
if (::getsockname(rep->sock, sin.addr (), &len) == -1)
|
||||
+#else
|
||||
+ if (::getsockname(rep->sock, sin.addr (), (socklen_t *) &len) == -1)
|
||||
+#endif
|
||||
perror("sockinetbuf::localaddr()");
|
||||
return sin;
|
||||
}
|
||||
@@ -168,7 +173,11 @@
|
||||
{
|
||||
sockinetaddr sin;
|
||||
int len = sin.size();
|
||||
+#if (__FreeBSD_version < 400013)
|
||||
if (::getpeername(rep->sock, sin.addr (), &len) == -1)
|
||||
+#else
|
||||
+ if (::getpeername(rep->sock, sin.addr (), (socklen_t *) &len) == -1)
|
||||
+#endif
|
||||
perror("sockinetbuf::peeraddr()");
|
||||
return sin;
|
||||
}
|
Loading…
Reference in New Issue
Block a user