diff options
-rw-r--r-- | net/cap/files/patch-ad | 2 | ||||
-rw-r--r-- | net/cap/files/patch-ah | 2 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-aa | 21 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-ac | 4 | ||||
-rw-r--r-- | sysutils/xperfmon3/files/patch-aa | 21 | ||||
-rw-r--r-- | sysutils/xperfmon3/files/patch-ac | 4 |
6 files changed, 18 insertions, 36 deletions
diff --git a/net/cap/files/patch-ad b/net/cap/files/patch-ad index b84cd4c..0073ed2 100644 --- a/net/cap/files/patch-ad +++ b/net/cap/files/patch-ad @@ -8,7 +8,7 @@ +#if __FreeBSD__ >= 2 +#include <osreldate.h> +#endif -+#if __FreeBSD_version >= 199702 ++#if __FreeBSD_version >= 300000 +#include <net/if_var.h> +#endif +#endif /*__FreeBSD__*/ diff --git a/net/cap/files/patch-ah b/net/cap/files/patch-ah index 77553f4..af5ed3f 100644 --- a/net/cap/files/patch-ah +++ b/net/cap/files/patch-ah @@ -8,7 +8,7 @@ +#if __FreeBSD__ >= 2 +#include <osreldate.h> +#endif -+#if __FreeBSD_version >= 199702 ++#if __FreeBSD_version >= 300000 +#include <net/if_var.h> +#endif +#endif /*__FreeBSD__*/ diff --git a/sysutils/xperfmon/files/patch-aa b/sysutils/xperfmon/files/patch-aa index 5a44adb..6bd96e2 100644 --- a/sysutils/xperfmon/files/patch-aa +++ b/sysutils/xperfmon/files/patch-aa @@ -3,7 +3,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c --- ./freebsd_system.c Sun Sep 22 17:14:41 1996 *************** *** 0 **** ---- 1,581 ---- +--- 1,572 ---- + /* + * Perfmon Performance Monitor + * @@ -96,16 +96,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + #define CTL_FS CTL_VFS /* compatibility w/ Lite1 */ + #endif + -+ /* -+ * XXX temporary hack: FreeBSD-2.2-current has been floating around -+ * with 199508 for some time; FreeBSD-2.1 will be 199511 however (so -+ * 2.2-current has been bumped to 199512 recently). Recognize the old -+ * 2.2-current as NFSv3 for a grace period. -+ * FreeBSD 2.0.5 was 199504, btw. Both, 2.0.5 and 2.1 don't have -+ * NFSv3. -+ * Also 2.1.5 which is 199607 don't have NFSv3! So check > 199607 -+ */ -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + # define HAS_NFS_V3 + #endif /* FreeBSD_version */ + @@ -489,7 +480,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + struct swdevt *sw; + long blocksize, *perdev; + struct rlist head; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + struct rlisthdr swaplist; + struct rlist *swapptr; + #else @@ -508,14 +499,14 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + /* Count up swap space. */ + nfree = 0; + memset(perdev, 0, nswdev * sizeof(*perdev)); -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + swapptr = swaplist.rlh_list; + while (swapptr) { + #else + while (swaplist) { + #endif + int top, bottom, next_block; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + kvm_read(kd, (u_long)swapptr, &head, sizeof(struct rlist)); + #else + kvm_read(kd, (u_long)swaplist, &head, sizeof(struct rlist)); @@ -545,7 +536,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + } + perdev[(bottom / dmmax) % nswdev] += + top - bottom + 1; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + swapptr = head.rl_next; + #else + swaplist = head.rl_next; diff --git a/sysutils/xperfmon/files/patch-ac b/sysutils/xperfmon/files/patch-ac index 1b74333..c2cc4b6 100644 --- a/sysutils/xperfmon/files/patch-ac +++ b/sysutils/xperfmon/files/patch-ac @@ -14,7 +14,7 @@ - if (nl[N_IFNET].n_value != 0) { + if ((ifnetaddr = nl[N_IFNET].n_value) != 0) { -+#if __FreeBSD_version <= 199701 ++#if __FreeBSD_version < 300000 struct ifnet ifnet; kread(N_IFNET, &ifnetaddr, sizeof(ifnetaddr)); old_packets = packets; @@ -22,7 +22,7 @@ packets.collisions += ifnet.if_collisions; ifnetaddr = (u_long) ifnet.if_next; } -+#else /* 3.0-current, Jan 1997 */ ++#else /* 3.0-* */ + /* Stolen from netstat/if.c */ + struct ifnet ifnet; + struct ifnethead ifnethead; diff --git a/sysutils/xperfmon3/files/patch-aa b/sysutils/xperfmon3/files/patch-aa index 5a44adb..6bd96e2 100644 --- a/sysutils/xperfmon3/files/patch-aa +++ b/sysutils/xperfmon3/files/patch-aa @@ -3,7 +3,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c --- ./freebsd_system.c Sun Sep 22 17:14:41 1996 *************** *** 0 **** ---- 1,581 ---- +--- 1,572 ---- + /* + * Perfmon Performance Monitor + * @@ -96,16 +96,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + #define CTL_FS CTL_VFS /* compatibility w/ Lite1 */ + #endif + -+ /* -+ * XXX temporary hack: FreeBSD-2.2-current has been floating around -+ * with 199508 for some time; FreeBSD-2.1 will be 199511 however (so -+ * 2.2-current has been bumped to 199512 recently). Recognize the old -+ * 2.2-current as NFSv3 for a grace period. -+ * FreeBSD 2.0.5 was 199504, btw. Both, 2.0.5 and 2.1 don't have -+ * NFSv3. -+ * Also 2.1.5 which is 199607 don't have NFSv3! So check > 199607 -+ */ -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + # define HAS_NFS_V3 + #endif /* FreeBSD_version */ + @@ -489,7 +480,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + struct swdevt *sw; + long blocksize, *perdev; + struct rlist head; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + struct rlisthdr swaplist; + struct rlist *swapptr; + #else @@ -508,14 +499,14 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + /* Count up swap space. */ + nfree = 0; + memset(perdev, 0, nswdev * sizeof(*perdev)); -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + swapptr = swaplist.rlh_list; + while (swapptr) { + #else + while (swaplist) { + #endif + int top, bottom, next_block; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + kvm_read(kd, (u_long)swapptr, &head, sizeof(struct rlist)); + #else + kvm_read(kd, (u_long)swaplist, &head, sizeof(struct rlist)); @@ -545,7 +536,7 @@ diff -c -N ../xperfmon++/freebsd_system.c ./freebsd_system.c + } + perdev[(bottom / dmmax) % nswdev] += + top - bottom + 1; -+ #if __FreeBSD_version > 199607 || __FreeBSD_version == 199508 ++ #if __FreeBSD_version >= 220000 + swapptr = head.rl_next; + #else + swaplist = head.rl_next; diff --git a/sysutils/xperfmon3/files/patch-ac b/sysutils/xperfmon3/files/patch-ac index 1b74333..c2cc4b6 100644 --- a/sysutils/xperfmon3/files/patch-ac +++ b/sysutils/xperfmon3/files/patch-ac @@ -14,7 +14,7 @@ - if (nl[N_IFNET].n_value != 0) { + if ((ifnetaddr = nl[N_IFNET].n_value) != 0) { -+#if __FreeBSD_version <= 199701 ++#if __FreeBSD_version < 300000 struct ifnet ifnet; kread(N_IFNET, &ifnetaddr, sizeof(ifnetaddr)); old_packets = packets; @@ -22,7 +22,7 @@ packets.collisions += ifnet.if_collisions; ifnetaddr = (u_long) ifnet.if_next; } -+#else /* 3.0-current, Jan 1997 */ ++#else /* 3.0-* */ + /* Stolen from netstat/if.c */ + struct ifnet ifnet; + struct ifnethead ifnethead; |