commit: 53850637c80c396e18ffd3f99ac2c963a3f0af91 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sun Jun 1 13:35:52 2025 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sun Jun 1 13:36:41 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53850637
app-misc/screen-4.9.1: fix pty.h patch for non-Linux only include pty.h on Linux where it exists (and is necessary) Bug: https://bugs.gentoo.org/953896 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> .../screen/files/screen-4.9.1-add-missing-pty.h-header.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app-misc/screen/files/screen-4.9.1-add-missing-pty.h-header.patch b/app-misc/screen/files/screen-4.9.1-add-missing-pty.h-header.patch index f66d86268088..81182862989e 100644 --- a/app-misc/screen/files/screen-4.9.1-add-missing-pty.h-header.patch +++ b/app-misc/screen/files/screen-4.9.1-add-missing-pty.h-header.patch @@ -1,10 +1,18 @@ +https://bugs.gentoo.org/953896 + +pty.h is necessary on some Linux, but it isn't in POSIX, so it breaks +systems like macOS, *BSD, HPUX, AIX and Solaris. Basically everywhere +not-Linux, so add guard to only apply on Linux. + --- a/pty.c +++ b/pty.c -@@ -29,6 +29,7 @@ +@@ -29,6 +29,9 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> ++#if defined(__linux__) || defined(__linux) || defined(linux) +#include <pty.h> ++#endif #include <signal.h> #if defined(__OpenBSD__)
