summaryrefslogtreecommitdiff
path: root/app-misc/screen/files/screen-4.9.1-add-missing-pty.h-header.patch
blob: 4e39cd947c01a88624d6fc818488b3add405808c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#if defined(__linux__) || defined(__linux) || defined(linux) || defined(__GNU__)
+#include <pty.h>
+#endif
 #include <signal.h>
 
 #if defined(__OpenBSD__)