1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

net-mgmt/net-snmp: Fix build under 14-CURRENT > 1400066

IPFRAGTTL was removed in 81a34d374ed6e5a7b14f24583bc8e3abfdc66306
(1400067). Define the value in the port.
This commit is contained in:
Cy Schubert 2022-09-27 20:21:01 -07:00
parent 1b43fb5f2e
commit ce59a3f9d9
3 changed files with 56 additions and 0 deletions

View File

@ -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 <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/data_access/ip_scalars.h>
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/protosw.h>
#include <sys/sysctl.h>
@@ -16,6 +17,12 @@
#include <netinet/ip.h>
#include <errno.h>
#include <stdlib.h>
+
+#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

View File

@ -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 <net-snmp/net-snmp-config.h>
#include "mibII_common.h"
+#include <sys/param.h>
+
+#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 <sys/hashing.h>

View File

@ -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 <net-snmp/net-snmp-features.h>
#include "mibII_common.h"
+#include <sys/param.h>
+
+#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 <stdlib.h>
#endif