diff options
author | ahoka <ahoka@pkgsrc.org> | 2008-08-04 14:54:27 +0000 |
---|---|---|
committer | ahoka <ahoka@pkgsrc.org> | 2008-08-04 14:54:27 +0000 |
commit | 05c72ad655ccd15735c0d9e932a5579dc44d2296 (patch) | |
tree | 7d8908890c2f0a07ba2eb78e93cb3daadcd3a871 /net/gnome-netstatus | |
parent | 27324b9b02171a09746c884200e85265de2960dd (diff) | |
download | pkgsrc-05c72ad655ccd15735c0d9e932a5579dc44d2296.tar.gz |
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 (limited to 'net/gnome-netstatus')
-rw-r--r-- | net/gnome-netstatus/Makefile | 4 | ||||
-rw-r--r-- | net/gnome-netstatus/distinfo | 3 | ||||
-rw-r--r-- | net/gnome-netstatus/patches/patch-aa | 31 |
3 files changed, 35 insertions, 3 deletions
diff --git a/net/gnome-netstatus/Makefile b/net/gnome-netstatus/Makefile index 355bd0c3807..e35067dac54 100644 --- a/net/gnome-netstatus/Makefile +++ b/net/gnome-netstatus/Makefile @@ -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 --git a/net/gnome-netstatus/distinfo b/net/gnome-netstatus/distinfo index 86319d6ee0f..33b70c2548c 100644 --- a/net/gnome-netstatus/distinfo +++ b/net/gnome-netstatus/distinfo @@ -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 --git a/net/gnome-netstatus/patches/patch-aa b/net/gnome-netstatus/patches/patch-aa new file mode 100644 index 00000000000..2de79413ca3 --- /dev/null +++ b/net/gnome-netstatus/patches/patch-aa @@ -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) + { |