pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/neon -on NetBSD, set the sa_len sockaddr field, ma...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4d8f48ca0394
branches:  trunk
changeset: 562303:4d8f48ca0394
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Fri Jul 24 18:06:04 2009 +0000

description:
-on NetBSD, set the sa_len sockaddr field, makes at least the
 "reverse lookup" selftest succeed
-fix a memory allocation in case a sockaddr is larger than
 "struct addrinfo" -- likely with IPv6
ride on update

diffstat:

 www/neon/Makefile         |   3 +-
 www/neon/distinfo         |   3 +-
 www/neon/patches/patch-ab |  53 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 57 insertions(+), 2 deletions(-)

diffs (86 lines):

diff -r 0d6728f59647 -r 4d8f48ca0394 www/neon/Makefile
--- a/www/neon/Makefile Fri Jul 24 17:52:00 2009 +0000
+++ b/www/neon/Makefile Fri Jul 24 18:06:04 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2009/07/24 15:18:24 tnn Exp $
+# $NetBSD: Makefile,v 1.47 2009/07/24 18:06:04 drochner Exp $
 
 DISTNAME=      neon-0.28.5
 CATEGORIES=    www
@@ -20,6 +20,7 @@
 
 PKGCONFIG_OVERRIDE=    neon.pc.in
 TEST_TARGET=           check
+USE_TOOLS+=            perl
 
 .include "options.mk"
 
diff -r 0d6728f59647 -r 4d8f48ca0394 www/neon/distinfo
--- a/www/neon/distinfo Fri Jul 24 17:52:00 2009 +0000
+++ b/www/neon/distinfo Fri Jul 24 18:06:04 2009 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.19 2009/07/24 15:18:24 tnn Exp $
+$NetBSD: distinfo,v 1.20 2009/07/24 18:06:04 drochner Exp $
 
 SHA1 (neon-0.28.5.tar.gz) = cc07c9d2967cf9b290514ad2fc756abe1f854eba
 RMD160 (neon-0.28.5.tar.gz) = 21abcf12dd813bc464f6579995ff8912a9e1996e
 Size (neon-0.28.5.tar.gz) = 777079 bytes
 SHA1 (patch-aa) = e6284e486fa5789a65827a4d6c1b4d0911523774
+SHA1 (patch-ab) = 0a507c119c703f11de9ed6728e9de43a61fac5a9
diff -r 0d6728f59647 -r 4d8f48ca0394 www/neon/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/neon/patches/patch-ab Fri Jul 24 18:06:04 2009 +0000
@@ -0,0 +1,53 @@
+$NetBSD: patch-ab,v 1.1 2009/07/24 18:06:04 drochner Exp $
+
+--- src/ne_socket.c.orig       2009-06-09 15:34:34.000000000 +0200
++++ src/ne_socket.c
+@@ -1192,6 +1192,9 @@ static int do_bind(int fd, int peer_fami
+         in6.sin6_port = htons(port);
+         /* fill in the _family field for AIX 4.3, which forgets to do so. */
+         in6.sin6_family = AF_INET6;
++#ifdef __NetBSD__
++      in6.sin6_len = sizeof in6;
++#endif
+ 
+         return bind(fd, (struct sockaddr *)&in6, sizeof in6);
+     } else
+@@ -1210,6 +1213,9 @@ static int do_bind(int fd, int peer_fami
+         }
+         in.sin_port = htons(port);
+         in.sin_family = AF_INET;
++#ifdef __NetBSD__
++      in.sin_len = sizeof in;
++#endif
+ 
+         return bind(fd, (struct sockaddr *)&in, sizeof in);
+     }
+@@ -1328,7 +1334,7 @@ ne_inet_addr *ne_sock_peer(ne_socket *so
+ 
+     ia = ne_calloc(sizeof *ia);
+ #ifdef USE_GETADDRINFO
+-    ia->ai_addr = ne_malloc(sizeof *ia);
++    ia->ai_addr = ne_malloc(len);
+     ia->ai_addrlen = len;
+     memcpy(ia->ai_addr, sad, len);
+     ia->ai_family = sad->sa_family;
+@@ -1364,6 +1370,9 @@ ne_inet_addr *ne_iaddr_make(ne_iaddr_typ
+       ia->ai_addr = (struct sockaddr *)in4;
+       ia->ai_addrlen = sizeof *in4;
+       in4->sin_family = AF_INET;
++#ifdef __NetBSD__
++      in4->sin_len = sizeof *in4;
++#endif
+       memcpy(&in4->sin_addr.s_addr, raw, sizeof in4->sin_addr.s_addr);
+     }
+ #ifdef AF_INET6
+@@ -1373,6 +1382,9 @@ ne_inet_addr *ne_iaddr_make(ne_iaddr_typ
+       ia->ai_addr = (struct sockaddr *)in6;
+       ia->ai_addrlen = sizeof *in6;
+       in6->sin6_family = AF_INET6;
++#ifdef __NetBSD__
++      in6->sin6_len = sizeof *in6;
++#endif
+       memcpy(&in6->sin6_addr, raw, sizeof in6->sin6_addr.s6_addr);
+     }
+ #endif



Home | Main Index | Thread Index | Old Index