git: 6027322e3b91 - main - sysutils/screen: Fix build on __FreeBSD_version >= 1500020

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 18 Jul 2024 04:06:48 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6027322e3b910f59fb4af0c162d51135392d6c23

commit 6027322e3b910f59fb4af0c162d51135392d6c23
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-07-18 04:02:10 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-07-18 04:06:41 +0000

    sysutils/screen: Fix build on __FreeBSD_version >= 1500020
    
    I haven't bisected the real cause but I believe this breakage was
    likely caused by the recent ssp commits to 15-CURRENT.
---
 sysutils/screen/files/patch-osdef.h.in | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sysutils/screen/files/patch-osdef.h.in b/sysutils/screen/files/patch-osdef.h.in
new file mode 100644
index 000000000000..3b32fe80ed81
--- /dev/null
+++ b/sysutils/screen/files/patch-osdef.h.in
@@ -0,0 +1,19 @@
+--- osdef.h.in.orig	2023-08-15 17:29:26.000000000 -0700
++++ osdef.h.in	2024-07-17 20:59:56.936179000 -0700
+@@ -28,6 +28,8 @@
+  ****************************************************************
+  */
+ 
++#include <sys/param.h>
++#if defined(__FreeBSD_version) && __FreeBSD_version < 1500020
+ extern int   printf __P((char *, ...));
+ extern int   fprintf __P((FILE *, char *, ...));
+ extern int   sprintf __P((char *, char *, ...));
+@@ -71,6 +73,7 @@
+ #else
+ extern void  bcopy __P((char *, char *, int));
+ #endif
++#endif /* __FreeBSD_version */
+ 
+ #ifdef BSDWAIT
+ struct rusage;		/* for wait3 __P */