pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/gnome-netstatus Fix interface listing on NetBSD an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bf0246fdbad8
branches:  trunk
changeset: 545469:bf0246fdbad8
user:      ahoka <ahoka%pkgsrc.org@localhost>
date:      Mon Aug 04 14:54:27 2008 +0000

description:
Fix interface listing on NetBSD and FreeBSD.
Patch submitted by Roy Marples.

For more information about the problem see:
http://bugzilla.gnome.org/show_bug.cgi?id=453070

diffstat:

 net/gnome-netstatus/Makefile         |   4 ++--
 net/gnome-netstatus/distinfo         |   3 ++-
 net/gnome-netstatus/patches/patch-aa |  31 +++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 3 deletions(-)

diffs (60 lines):

diff -r 8fbf78afda4c -r bf0246fdbad8 net/gnome-netstatus/Makefile
--- a/net/gnome-netstatus/Makefile      Mon Aug 04 13:32:42 2008 +0000
+++ b/net/gnome-netstatus/Makefile      Mon Aug 04 14:54:27 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.32 2008/06/20 01:09:30 joerg Exp $
+# $NetBSD: Makefile,v 1.33 2008/08/04 14:54:27 ahoka Exp $
 #
 
 DISTNAME=      gnome-netstatus-2.12.1
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    net gnome
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/gnome-netstatus/2.12/}
 EXTRACT_SUFX=  .tar.bz2
diff -r 8fbf78afda4c -r bf0246fdbad8 net/gnome-netstatus/distinfo
--- a/net/gnome-netstatus/distinfo      Mon Aug 04 13:32:42 2008 +0000
+++ b/net/gnome-netstatus/distinfo      Mon Aug 04 14:54:27 2008 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.9 2007/03/24 19:29:37 wiz Exp $
+$NetBSD: distinfo,v 1.10 2008/08/04 14:54:27 ahoka Exp $
 
 SHA1 (gnome-netstatus-2.12.1.tar.bz2) = ed899ee34c5f9f6e7b7601336c11b68b9af40568
 RMD160 (gnome-netstatus-2.12.1.tar.bz2) = 4ffa47d36015370ba21d2e1ee6d118210fef5dc4
 Size (gnome-netstatus-2.12.1.tar.bz2) = 500536 bytes
+SHA1 (patch-aa) = cab8588a081191ee59c9f16f6481aa330331e38d
diff -r 8fbf78afda4c -r bf0246fdbad8 net/gnome-netstatus/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/gnome-netstatus/patches/patch-aa      Mon Aug 04 14:54:27 2008 +0000
@@ -0,0 +1,31 @@
+$NetBSD $
+
+--- src/netstatus-iface.c.orig 2007-02-13 10:39:19.000000000 +0100
++++ src/netstatus-iface.c
+@@ -1121,12 +1121,6 @@ netstatus_iface_get_device_details (Nets
+   return TRUE;
+ }
+ 
+-#if !defined(HAVE_SOCKADDR_SA_LEN)
+-#define NETSTATUS_SA_LEN(saddr) (sizeof (struct sockaddr))
+-#else
+-#define NETSTATUS_SA_LEN(saddr) (MAX ((saddr)->sa_len, sizeof (struct sockaddr)))
+-#endif /* HAVE_SOCKADDR_SA_LEN */
+-
+ /* Taken From R. Stevens Unix Network Programming Vol. 1.
+  *
+  * SIOCGIFCONF does not return an error on all systems if
+@@ -1220,7 +1214,12 @@ netstatus_list_interface_names (GError *
+       struct ifreq *if_req = (struct ifreq *) p;
+       gboolean      loopback = FALSE;
+ 
+-      p += sizeof (if_req->ifr_name) + NETSTATUS_SA_LEN (&if_req->ifr_addr);
++#ifdef HAVE_SOCKADDR_SA_LEN
++      if (if_req->ifr_addr.sa_len > sizeof(if_req->ifr_ifru))
++        p += offsetof(struct ifreq, ifr_ifru) + if_req->ifr_addr.sa_len;
++      else
++#endif /* HAVE_SOCKADDR_SA_LEN */
++        p += sizeof (*if_req);
+ 
+       if (ioctl (fd, SIOCGIFFLAGS, if_req) < 0)
+       {



Home | Main Index | Thread Index | Old Index