aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/parallels-tools
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-10-03 02:23:42 +0800
committerglebius <glebius@FreeBSD.org>2014-10-03 02:23:42 +0800
commit2c383d366ea7d66ec43137f23112b10bba5cc3a9 (patch)
treead240f5fe5ae933c6e64de4dca379b57153898bb /emulators/parallels-tools
parente71a7f2145a90f700b0a44b6e872f714831433ce (diff)
downloadfreebsd-ports-gnome-2c383d366ea7d66ec43137f23112b10bba5cc3a9.tar.gz
freebsd-ports-gnome-2c383d366ea7d66ec43137f23112b10bba5cc3a9.tar.zst
freebsd-ports-gnome-2c383d366ea7d66ec43137f23112b10bba5cc3a9.zip
Update for ifnet(9) changes in head.
Approved by: bapt (blanket)
Diffstat (limited to 'emulators/parallels-tools')
-rw-r--r--emulators/parallels-tools/Makefile1
-rw-r--r--emulators/parallels-tools/files/patch-pvmnet-if_pvmnet.c47
2 files changed, 48 insertions, 0 deletions
diff --git a/emulators/parallels-tools/Makefile b/emulators/parallels-tools/Makefile
index 911bea2e5fb2..06ff9a407194 100644
--- a/emulators/parallels-tools/Makefile
+++ b/emulators/parallels-tools/Makefile
@@ -3,6 +3,7 @@
PORTNAME= parallels-tools
PORTVERSION= 0.1.2
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= LOCAL/bland
diff --git a/emulators/parallels-tools/files/patch-pvmnet-if_pvmnet.c b/emulators/parallels-tools/files/patch-pvmnet-if_pvmnet.c
new file mode 100644
index 000000000000..7245abf6e8af
--- /dev/null
+++ b/emulators/parallels-tools/files/patch-pvmnet-if_pvmnet.c
@@ -0,0 +1,47 @@
+--- pvmnet/if_pvmnet.c.orig 2014-10-02 22:19:21.000000000 +0400
++++ pvmnet/if_pvmnet.c 2014-10-02 22:21:10.000000000 +0400
+@@ -364,12 +364,20 @@
+ for (offset = io_get_rcv_offset(sc);
+ (size = io_get_packet_size(sc, offset)); offset += FULL_PACKET_SIZE(size)) {
+ if (size > ETHER_MAX_LEN) {
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ continue;
+ }
+ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+ if (m == NULL) {
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ continue;
+ }
+ m->m_pkthdr.rcvif = ifp;
+@@ -379,7 +387,11 @@
+ m->m_pkthdr.len = m->m_len = size;
+ io_read_data(sc, offset, m);
+
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
++#else
+ ifp->if_ipackets++;
++#endif
+
+ PVMNET_UNLOCK(sc);
+ (*ifp->if_input)(ifp, m);
+@@ -538,7 +550,11 @@
+ io_notify_sndbuf_full(sc);
+ break;
+ }
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
++#else
+ ifp->if_opackets++;
++#endif
+ BPF_MTAP(ifp, m);
+ m_freem(m);
+ }