diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-04-07 23:20:31 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-04-07 23:20:31 +0000 |
commit | 509fcc6f168e181f8fa266a478a825143617e21b (patch) | |
tree | b8dd460d91d87c50ccbcecb91005c14cc3676dd1 /net-mgmt/net-snmp | |
parent | e34252aaf11836d389a7aec4b2397897bc02f68e (diff) | |
download | ports-509fcc6f168e181f8fa266a478a825143617e21b.tar.gz ports-509fcc6f168e181f8fa266a478a825143617e21b.zip |
Fix build when IPv6 is disabled.
Submitted by: kan
Notes
Notes:
svn path=/head/; revision=437975
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r-- | net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c index 17540b0a1817..e409a9990b3d 100644 --- a/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c +++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c @@ -1,6 +1,18 @@ ---- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig 2017-03-15 18:18:33.000000000 +0000 -+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c 2017-03-15 18:18:33.000000000 +0000 -@@ -164,9 +164,24 @@ +--- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig 2014-12-08 12:23:22.000000000 -0800 ++++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c 2017-04-07 16:05:05.752849000 -0700 +@@ -153,7 +153,11 @@ + #endif + + #if !defined(NETSNMP_ENABLE_IPV6) ++#if __FreeBSD_version >= 1200026 ++ if (pcb.inp_vflag & INP_IPV6) ++#else + if (pcb.xi_inp.inp_vflag & INP_IPV6) ++#endif + continue; + #endif + +@@ -164,9 +168,24 @@ } /** oddly enough, these appear to already be in network order */ @@ -26,7 +38,7 @@ /** the addr string may need work */ if (pcb.xi_inp.inp_vflag & INP_IPV6) { -@@ -179,6 +194,8 @@ +@@ -179,6 +198,8 @@ memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4); memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4); } @@ -35,12 +47,12 @@ /* * add entry to container -@@ -186,6 +203,8 @@ - entry->index = CONTAINER_SIZE(container) + 1; +@@ -187,6 +208,8 @@ CONTAINER_INSERT(container, entry); } -+ -+ free(udpcb_buf); ++ free(udpcb_buf); ++ if(rc<0) return rc; + |