diff options
author | imura <imura@FreeBSD.org> | 2000-01-31 00:21:32 +0800 |
---|---|---|
committer | imura <imura@FreeBSD.org> | 2000-01-31 00:21:32 +0800 |
commit | f2d461e1b65ddbb71d0078e68b9a1a5e5d97f9f8 (patch) | |
tree | 32d4ddd95de77282aa07ad81bbf747e064f4fd12 | |
parent | 28617912fe62ec088006b6a0e6a4c189baf76d87 (diff) | |
download | freebsd-ports-graphics-f2d461e1b65ddbb71d0078e68b9a1a5e5d97f9f8.tar.gz freebsd-ports-graphics-f2d461e1b65ddbb71d0078e68b9a1a5e5d97f9f8.tar.zst freebsd-ports-graphics-f2d461e1b65ddbb71d0078e68b9a1a5e5d97f9f8.zip |
Fix compiler error in -current.
PR: 16443
Submitted by: Alexander Langer <alex@cichlids.com>
-rw-r--r-- | net/libsocket++/files/patch-ad | 50 | ||||
-rw-r--r-- | net/libsocket++/files/patch-ae | 34 |
2 files changed, 84 insertions, 0 deletions
diff --git a/net/libsocket++/files/patch-ad b/net/libsocket++/files/patch-ad new file mode 100644 index 00000000000..30934cc4eb2 --- /dev/null +++ b/net/libsocket++/files/patch-ad @@ -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; + } diff --git a/net/libsocket++/files/patch-ae b/net/libsocket++/files/patch-ae new file mode 100644 index 00000000000..2b809b0dad2 --- /dev/null +++ b/net/libsocket++/files/patch-ae @@ -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; + } |