aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-10-03 00:23:31 +0800
committerglebius <glebius@FreeBSD.org>2014-10-03 00:23:31 +0800
commitcd29d041cfd8d672d584f525d4843898fc49563f (patch)
tree7f671fde2def0f556ebde0cd4d916a25bce5b58d
parentc5c3152d689fb86f0ac98ad158f8ad37af37acf9 (diff)
downloadfreebsd-ports-gnome-cd29d041cfd8d672d584f525d4843898fc49563f.tar.gz
freebsd-ports-gnome-cd29d041cfd8d672d584f525d4843898fc49563f.tar.zst
freebsd-ports-gnome-cd29d041cfd8d672d584f525d4843898fc49563f.zip
Fix build on head.
Approved by: bapt
-rw-r--r--net/aoe/Makefile2
-rw-r--r--net/aoe/files/patch-aoenet.c74
2 files changed, 70 insertions, 6 deletions
diff --git a/net/aoe/Makefile b/net/aoe/Makefile
index 0f881b84a406..756933489d08 100644
--- a/net/aoe/Makefile
+++ b/net/aoe/Makefile
@@ -3,7 +3,7 @@
PORTNAME= aoe
PORTVERSION= 1.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net kld
MASTER_SITES= http://www.son.org/download/
DISTNAME= ${PORTNAME}-freebsd-${PORTVERSION}
diff --git a/net/aoe/files/patch-aoenet.c b/net/aoe/files/patch-aoenet.c
index a8d7dcd0d4ef..56eec89d559b 100644
--- a/net/aoe/files/patch-aoenet.c
+++ b/net/aoe/files/patch-aoenet.c
@@ -1,5 +1,5 @@
---- aoenet.c.orig 2006-05-25 23:10:11.000000000 +0700
-+++ aoenet.c 2014-09-14 02:02:02.000000000 +0700
+--- aoenet.c.orig 2006-05-25 20:10:11.000000000 +0400
++++ aoenet.c 2014-10-02 20:18:23.000000000 +0400
@@ -77,8 +77,11 @@
#define NECODES (sizeof(aoe_errlist) / sizeof(char *) - 1)
#if (__FreeBSD_version < 600000)
@@ -103,7 +103,31 @@
}
-@@ -384,9 +416,9 @@
+@@ -362,7 +394,11 @@
+ */
+ if ((m->m_flags & M_PKTHDR) == 0) {
+ if_printf(ifp, "discard frame w/o packet header\n");
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -371,7 +407,11 @@
+ if_printf(ifp, "discard frame w/o leading ethernet "
+ "header (len %u pkt len %u)\n",
+ m->m_len, m->m_pkthdr.len);
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -384,17 +424,25 @@
if (m->m_pkthdr.len >
ETHER_MAX_FRAME(ifp, etype, m->m_flags & M_HASFCS)) {
if_printf(ifp, "discard oversize frame "
@@ -113,9 +137,49 @@
- ETHER_MAX_FRAME(ifp, etype,
+ (int) ETHER_MAX_FRAME(ifp, etype,
m->m_flags & M_HASFCS));
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
ifp->if_ierrors++;
++#endif
m_freem(m);
-@@ -472,7 +504,11 @@
+ return;
+ }
+ if (m->m_pkthdr.rcvif == NULL) {
+ if_printf(ifp, "discard frame w/o interface pointer\n");
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -417,7 +465,11 @@
+ m->m_flags &= ~M_HASFCS;
+ }
+
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
++#else
+ ifp->if_ibytes += m->m_pkthdr.len;
++#endif
+
+ if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
+ if (bcmp(etherbroadcastaddr, eh->ether_dhost,
+@@ -427,7 +479,11 @@
+ m->m_flags |= M_MCAST;
+ }
+ if (m->m_flags & (M_BCAST|M_MCAST))
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IMCASTS, 1);
++#else
+ ifp->if_imcasts++;
++#endif
+
+ aoeintr(m);
+ /* netisr_dispatch(NETISR_AOE, m); */
+@@ -472,7 +528,11 @@
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &ifnet, if_link) {
@@ -127,7 +191,7 @@
case IFT_ETHER:
case IFT_FASTETHER:
case IFT_GIGABITETHERNET:
-@@ -501,7 +537,11 @@
+@@ -501,7 +561,11 @@
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &ifnet, if_link) {