From ce59a3f9d9d15e48d112a1b2a1bd61d54b51f43f Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Tue, 27 Sep 2022 20:21:01 -0700 Subject: [PATCH] net-mgmt/net-snmp: Fix build under 14-CURRENT > 1400066 IPFRAGTTL was removed in 81a34d374ed6e5a7b14f24583bc8e3abfdc66306 (1400067). Define the value in the port. --- ...roup_ip-mib_data__access_scalars__sysctl.c | 23 +++++++++++++++++++ .../files/patch-agent_mibgroup_mibII_ip.c | 16 +++++++++++++ .../files/patch-agent_mibgroup_mibII_tcp.c | 17 ++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 net-mgmt/net-snmp/files/patch-agent_mibgroup_ip-mib_data__access_scalars__sysctl.c create mode 100644 net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_ip.c create mode 100644 net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_ip-mib_data__access_scalars__sysctl.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_ip-mib_data__access_scalars__sysctl.c new file mode 100644 index 000000000000..ce13e2022ab2 --- /dev/null +++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_ip-mib_data__access_scalars__sysctl.c @@ -0,0 +1,23 @@ +--- agent/mibgroup/ip-mib/data_access/scalars_sysctl.c.orig 2021-05-25 15:19:35.000000000 -0700 ++++ agent/mibgroup/ip-mib/data_access/scalars_sysctl.c 2022-09-27 20:25:15.687146000 -0700 +@@ -9,6 +9,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -16,6 +17,12 @@ + #include + #include + #include ++ ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1400066 ++#define IPFRAGTTL 60 /* time to live for frags, slowhz */ ++#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ ++#define PR_FASTHZ 5 /* 5 fast timeouts per second */ ++#endif + + /* XXX: the values passed to netsnmp_arch_ip_scalars(..) may or may not be + * portable to the other BSDs -- it seems to be portable back to FreeBSD 4.x diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_ip.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_ip.c new file mode 100644 index 000000000000..abf6b0ab944a --- /dev/null +++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_ip.c @@ -0,0 +1,16 @@ +--- agent/mibgroup/mibII/ip.c.orig 2021-05-25 15:19:35.000000000 -0700 ++++ agent/mibgroup/mibII/ip.c 2022-09-27 20:25:12.959145000 -0700 +@@ -5,6 +5,13 @@ + + #include + #include "mibII_common.h" ++#include ++ ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1400066 ++#define IPFRAGTTL 60 /* time to live for frags, slowhz */ ++#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ ++#define PR_FASTHZ 5 /* 5 fast timeouts per second */ ++#endif + + #if HAVE_SYS_HASHING_H + #include diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c new file mode 100644 index 000000000000..4919b4e3c974 --- /dev/null +++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c @@ -0,0 +1,17 @@ +--- agent/mibgroup/mibII/tcp.c.orig 2021-05-25 15:19:35.000000000 -0700 ++++ agent/mibgroup/mibII/tcp.c 2022-09-27 20:36:22.284180000 -0700 +@@ -8,6 +8,14 @@ + #include + #include "mibII_common.h" + ++#include ++ ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1400066 ++#define IPFRAGTTL 60 /* time to live for frags, slowhz */ ++#define PR_SLOWHZ 2 /* 2 slow timeouts per second */ ++#define PR_FASTHZ 5 /* 5 fast timeouts per second */ ++#endif ++ + #if HAVE_STDLIB_H + #include + #endif