git: 2b625445f942 - main - sysutils/heirloom: Fix build on 15-CURRENT after e24a65528388

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Fri, 02 Aug 2024 15:19:34 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b625445f9426de4b38497e2778743dc7f5741b8

commit 2b625445f9426de4b38497e2778743dc7f5741b8
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-08-02 15:12:26 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-08-02 15:14:57 +0000

    sysutils/heirloom: Fix build on 15-CURRENT after e24a65528388
    
    src/e24a65528388 was one of a series of commits to 15-CURRENT that
    removed kernel stack swapping support. e24a65528388 removed the
    P_SWAPPINGOUT flag resulting in this port failing to build on
    15-CURRENT. Remove the test for the flag.
    
    MFH:    2024Q3
---
 sysutils/heirloom/files/patch-ps__ps.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/sysutils/heirloom/files/patch-ps__ps.c b/sysutils/heirloom/files/patch-ps__ps.c
index adba8e5dcc85..822945949e45 100644
--- a/sysutils/heirloom/files/patch-ps__ps.c
+++ b/sysutils/heirloom/files/patch-ps__ps.c
@@ -1,6 +1,6 @@
---- ps/ps.c.orig	2007-02-02 06:40:20.000000000 -0800
-+++ ps/ps.c	2009-03-06 14:51:53.455864840 -0800
-@@ -88,6 +88,9 @@
+--- ps/ps.c.orig	2024-08-02 07:55:02.072464000 -0700
++++ ps/ps.c	2024-08-02 08:09:25.924815000 -0700
+@@ -87,6 +87,9 @@
  #define	proc	process
  #undef	p_pgid
  #undef	p_pctcpu
@@ -10,7 +10,7 @@
  #if defined (__DragonFly__)
  #endif	/* __DragonFly__ */
  #elif defined (__hpux)
-@@ -492,6 +495,7 @@
+@@ -491,6 +494,7 @@
  
  static void		postproc(struct proc *);
  static enum okay	selectproc(struct proc *);
@@ -18,7 +18,7 @@
  
  /************************************************************************
   * 			Utility functions				*
-@@ -2140,7 +2144,6 @@
+@@ -2139,7 +2143,6 @@
  static enum okay
  getproc_kvm(struct proc *p)
  {
@@ -26,7 +26,18 @@
  	struct kinfo_proc	*kp;
  	int	c;
  
-@@ -4875,6 +4878,7 @@
+@@ -2205,8 +2208,10 @@
+ #else	/* __FreeBSD__ >= 5 */
+ 	if (kp->ki_sflag & PS_INMEM)
+ 		p->p_flag |= FL_LOAD;
++#if (__FreeBSD__) < 15
+ 	if (kp->ki_sflag & PS_SWAPPINGOUT)
+ 		p->p_flag |= FL_SWAP;
++#endif	/* __FreeBSD__ < 15 */
+ 	p->p_oldpri = ((double)kp->ki_pri.pri_user - PRI_MIN) /
+ 		(PRI_MAX - PRI_MIN) * 60 + 60;
+ 	p->p_pri = 40 - ((double)kp->ki_pri.pri_user - PRI_MIN) /
+@@ -4874,6 +4879,7 @@
  #ifdef	__GLIBC__
  	putenv("POSIXLY_CORRECT=1");
  #endif