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 index af46e3d86d43..83470a30dedf 100644 --- a/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c +++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c @@ -1,17 +1,35 @@ ---- agent/mibgroup/mibII/tcp.c.orig 2023-08-15 20:32:01 UTC -+++ agent/mibgroup/mibII/tcp.c +--- agent/mibgroup/mibII/tcp.c.orig 2023-08-15 13:32:01.000000000 -0700 ++++ agent/mibgroup/mibII/tcp.c 2025-07-10 17:17:00.309421000 -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 + #ifdef HAVE_STDLIB_H #include #endif +@@ -38,8 +46,17 @@ + #include + #endif + #ifdef HAVE_NETINET_TCP_TIMER_H ++#if __FreeBSD_version >= 1500048 ++#define _KERNEL ++#define max(x, y) (((x) > (y)) ? (x) : (y)) ++#define MSEC_2_TICKS(m) max(1, (uint32_t)((hz == 1000) ? \ ++ (m) : ((uint64_t)(m) * (uint64_t)hz)/(uint64_t)1000)) ++#endif + #include ++#if __FreeBSD_version >= 1500048 ++#undef _KERNEL + #endif ++#endif + #ifdef HAVE_NETINET_TCP_VAR_H + #ifdef openbsd7 + #define _KERNEL /* OpenBSD 7.3 */