aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c')
-rw-r--r--net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c22
1 files changed, 20 insertions, 2 deletions
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,5 +1,5 @@
---- 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 <net-snmp/net-snmp-features.h>
#include "mibII_common.h"
@@ -15,3 +15,21 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+@@ -38,8 +46,17 @@
+ #include <netinet/tcpip.h>
+ #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 <netinet/tcp_timer.h>
++#if __FreeBSD_version >= 1500048
++#undef _KERNEL
+ #endif
++#endif
+ #ifdef HAVE_NETINET_TCP_VAR_H
+ #ifdef openbsd7
+ #define _KERNEL /* OpenBSD 7.3 */