Fix build on recent SunOS platforms

This commit is contained in:
fhajny 2012-06-14 17:16:22 +00:00
parent 30f3fc7ded
commit 25c0d8db3c
2 changed files with 16 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.4 2011/11/02 01:13:04 hubertf Exp $
$NetBSD: distinfo,v 1.5 2012/06/14 17:16:22 fhajny 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

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_fillmac.c,v 1.1 2012/06/14 17:16:23 fhajny Exp $
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)
strerror(errno));
return -1;
}
-#ifdef SIOCGIFHWADDR
+#if defined(SIOCGIFHWADDR) && !defined(__sun)
{
struct ifreq ifr;