svn commit: r436572 - in head/net-mgmt/collectd5: . files
Gleb Smirnoff
glebius at FreeBSD.org
Tue Mar 21 08:27:00 UTC 2017
Author: glebius (src committer)
Date: Tue Mar 21 08:26:58 2017
New Revision: 436572
URL: https://svnweb.freebsd.org/changeset/ports/436572
Log:
Make it compilable on FreeBSD 12 after struct inpcb and struct tcpcb were
stopped being exported.
Added:
head/net-mgmt/collectd5/files/patch-src__tcpconns.c (contents, props changed)
Modified:
head/net-mgmt/collectd5/Makefile
Modified: head/net-mgmt/collectd5/Makefile
==============================================================================
--- head/net-mgmt/collectd5/Makefile Tue Mar 21 08:26:01 2017 (r436571)
+++ head/net-mgmt/collectd5/Makefile Tue Mar 21 08:26:58 2017 (r436572)
@@ -3,6 +3,7 @@
PORTNAME= collectd
PORTVERSION= 5.7.1
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= https://collectd.org/files/ \
http://collectd.org/files/
Added: head/net-mgmt/collectd5/files/patch-src__tcpconns.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/collectd5/files/patch-src__tcpconns.c Tue Mar 21 08:26:58 2017 (r436572)
@@ -0,0 +1,18 @@
+--- src/tcpconns.c.orig 2017-03-21 00:18:33.371554000 -0700
++++ src/tcpconns.c 2017-03-21 00:21:09.631089000 -0700
+@@ -745,9 +745,15 @@
+ for (in_ptr = (struct xinpgen *)(((char *)in_orig) + in_orig->xig_len);
+ in_ptr->xig_len > sizeof(struct xinpgen);
+ in_ptr = (struct xinpgen *)(((char *)in_ptr) + in_ptr->xig_len)) {
++#if __FreeBSD_version >= 1200026
++ struct xtcpcb *tp = (struct xtcpcb *)in_ptr;
++ struct xinpcb *inp = &tp->xt_inp;
++ struct xsocket *so = &inp->xi_socket;
++#else
+ struct tcpcb *tp = &((struct xtcpcb *)in_ptr)->xt_tp;
+ struct inpcb *inp = &((struct xtcpcb *)in_ptr)->xt_inp;
+ struct xsocket *so = &((struct xtcpcb *)in_ptr)->xt_socket;
++#endif
+
+ /* Ignore non-TCP sockets */
+ if (so->xso_protocol != IPPROTO_TCP)
More information about the svn-ports-all
mailing list