mirror of
https://git.freebsd.org/ports.git
synced 2025-05-24 15:07:01 -04:00
Attempt to fix build on -current. Remove BROKEN_<arch> false positives.
PR: 219270 Submitted by: vladislav.movchan@gmail.com Approved by: maintainer
This commit is contained in:
parent
305c67dffe
commit
f611562af8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=444332
2 changed files with 56 additions and 5 deletions
|
@ -11,11 +11,6 @@ COMMENT= ASCII Monitor for system resources and process activity
|
|||
|
||||
LICENSE= GPLv2
|
||||
|
||||
BROKEN_armv6= fails to build: photosyst.c: 'struct xtcpcb' has no member named 'xt_tp'
|
||||
BROKEN_mips= fails to build: photosyst.c: 'struct xtcpcb' has no member named 'xt_tp'
|
||||
BROKEN_mips64= fails to build: photosyst.c: 'struct xtcpcb' has no member named 'xt_tp'
|
||||
BROKEN_powerpc64= fails to build: photosyst.c: 'struct xtcpcb' has no member named 'xt_tp'
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= samm-git
|
||||
GH_PROJECT= atop-freebsd
|
||||
|
|
56
sysutils/atop/files/patch-photosyst.c
Normal file
56
sysutils/atop/files/patch-photosyst.c
Normal file
|
@ -0,0 +1,56 @@
|
|||
--- photosyst.c.orig 2014-01-15 16:05:34 UTC
|
||||
+++ photosyst.c
|
||||
@@ -1118,7 +1118,11 @@ photosyst(struct sstat *si)
|
||||
si->cpu.nrcpu = ncpu;
|
||||
if (si->cpu.nrcpu == 0)
|
||||
si->cpu.nrcpu = 1;
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1200026
|
||||
+ count_t forks = 0;
|
||||
+#else
|
||||
int forks = 0;
|
||||
+#endif
|
||||
GETSYSCTL("vm.stats.vm.v_forkpages", forks);
|
||||
si->cpu.nprocs = forks;
|
||||
GETSYSCTL("kern.smp.maxcpus", maxcpus);
|
||||
@@ -1154,7 +1158,11 @@ photosyst(struct sstat *si)
|
||||
si->cpu.lavg5 = (double) sysload.ldavg[1] / sysload.fscale;
|
||||
si->cpu.lavg15 = (double) sysload.ldavg[2] / sysload.fscale;
|
||||
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1200026
|
||||
+ count_t devint = 0, csw = 0;
|
||||
+#else
|
||||
int devint = 0, csw = 0;
|
||||
+#endif
|
||||
GETSYSCTL("vm.stats.sys.v_intr", devint);
|
||||
if(devint)
|
||||
si->cpu.devint = devint;
|
||||
@@ -1263,7 +1271,11 @@ photosyst(struct sstat *si)
|
||||
si->mem.freeswap=swapary[0].ksw_total - swapary[0].ksw_used;
|
||||
}
|
||||
/* swap statistic */
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1200026
|
||||
+ count_t pswapin = 0, pswapout = 0;
|
||||
+#else
|
||||
int pswapin = 0, pswapout = 0;
|
||||
+#endif
|
||||
GETSYSCTL("vm.stats.vm.v_swapin",pswapin);
|
||||
if(pswapin)
|
||||
si->mem.swins = pswapin;
|
||||
@@ -1593,8 +1605,15 @@ photosyst(struct sstat *si)
|
||||
continue;
|
||||
|
||||
tcp_total++;
|
||||
- if (tp->xt_tp.t_state == TCPS_ESTABLISHED ||
|
||||
- tp->xt_tp.t_state == TCPS_CLOSE_WAIT)
|
||||
+ if (
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1200026
|
||||
+ tp->t_state == TCPS_ESTABLISHED ||
|
||||
+ tp->t_state == TCPS_CLOSE_WAIT
|
||||
+#else
|
||||
+ tp->xt_tp.t_state == TCPS_ESTABLISHED ||
|
||||
+ tp->xt_tp.t_state == TCPS_CLOSE_WAIT
|
||||
+#endif
|
||||
+ )
|
||||
tcp_count++;
|
||||
}
|
||||
si->net.tcp.CurrEstab = tcp_count;
|
Loading…
Add table
Reference in a new issue