summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-12-10 17:56:23 +0000
committerjperkin <jperkin@pkgsrc.org>2013-12-10 17:56:23 +0000
commita6b9fd261ec83075264121808c0b653cc6e77b11 (patch)
treef6b43f90b981bb59b97419f30409c046828b115e /net
parent58e6895385e342d889bdff3268610fe367f88ae9 (diff)
downloadpkgsrc-a6b9fd261ec83075264121808c0b653cc6e77b11.tar.gz
Add SIOCGLIFHWADDR support on newer SunOS. Bump PKGREVISION.
Diffstat (limited to 'net')
-rw-r--r--net/ucarp/Makefile4
-rw-r--r--net/ucarp/distinfo4
-rw-r--r--net/ucarp/patches/patch-src_fillmac.c24
3 files changed, 24 insertions, 8 deletions
diff --git a/net/ucarp/Makefile b/net/ucarp/Makefile
index c5229223005..1e90352d3bf 100644
--- a/net/ucarp/Makefile
+++ b/net/ucarp/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2013/02/06 19:31:02 jperkin Exp $
+# $NetBSD: Makefile,v 1.16 2013/12/10 17:56:23 jperkin Exp $
#
DISTNAME= ucarp-1.5.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftp.ucarp.org/pub/ucarp/
EXTRACT_SUFX= .tar.bz2
diff --git a/net/ucarp/distinfo b/net/ucarp/distinfo
index 8a7ec78687b..9a859eabe3f 100644
--- a/net/ucarp/distinfo
+++ b/net/ucarp/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2012/06/14 17:16:22 fhajny Exp $
+$NetBSD: distinfo,v 1.6 2013/12/10 17:56:23 jperkin Exp $
SHA1 (ucarp-1.5.2.tar.bz2) = 0326fa7460eacd23b59216878524487265051cba
RMD160 (ucarp-1.5.2.tar.bz2) = 83f54644abddf4b27f1b829c2a3a0fc98861027b
Size (ucarp-1.5.2.tar.bz2) = 315414 bytes
SHA1 (patch-aa) = ef0d7b65f6a964607a695c7a33891d45fd116569
-SHA1 (patch-src_fillmac.c) = 9870a6613bfb7c7eff7c6c9d164c8bf32bbe6454
+SHA1 (patch-src_fillmac.c) = c8d862d5e222aae283f1311735dff1f7be32f4af
diff --git a/net/ucarp/patches/patch-src_fillmac.c b/net/ucarp/patches/patch-src_fillmac.c
index 03939fe523b..c5275b7f644 100644
--- a/net/ucarp/patches/patch-src_fillmac.c
+++ b/net/ucarp/patches/patch-src_fillmac.c
@@ -1,14 +1,30 @@
-$NetBSD: patch-src_fillmac.c,v 1.1 2012/06/14 17:16:23 fhajny Exp $
+$NetBSD: patch-src_fillmac.c,v 1.2 2013/12/10 17:56:23 jperkin Exp $
+
+Add SIOCGLIFHWADDR support on newer SunOS.
-SIOCGIFHWADDR defined on recent SunOS, doesn't have the usual structure.
--- src/fillmac.c.orig 2007-07-04 13:34:59.000000000 +0000
+++ src/fillmac.c
-@@ -43,7 +43,7 @@ int fill_mac_address(void)
+@@ -43,7 +43,22 @@ int fill_mac_address(void)
strerror(errno));
return -1;
}
-#ifdef SIOCGIFHWADDR
-+#if defined(SIOCGIFHWADDR) && !defined(__sun)
++#if defined(SIOCGLIFHWADDR) && defined(__sun)
++ {
++ struct lifreq lifr;
++ struct sockaddr_dl *sdl;
++ strncpy(lifr.lifr_name, interface, sizeof lifr.lifr_name);
++ if (ioctl(s, SIOCGLIFHWADDR, &lifr) != 0) {
++ logfile(LOG_ERR,
++ _("Unable to get hardware info about an interface: %s"),
++ strerror(errno));
++ (void) close(s);
++ return -1;
++ }
++ sdl = (struct sockaddr_dl *)&lifr.lifr_addr;
++ memcpy(hwaddr, LLADDR(sdl), sdl->sdl_alen);
++ }
++#elif defined(SIOCGIFHWADDR)
{
struct ifreq ifr;