summaryrefslogtreecommitdiff
path: root/debian/patches/03-fix-terminal-handling-on-kfreebsd.patch
blob: d4bfb8b86b322e242301e5ef27d3d5c62c776c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Add some missing defined(__GLIBC__) to get linux-ish terminal handling.
Author: Axel Beckert <abe@debian.org>
Thanks: Jan Christoph Nordholz
Closes: #660567

Index: screen-4.1.0~20120320gitdb59704/pty.c
===================================================================
--- screen-4.1.0~20120320gitdb59704.orig/pty.c	2011-10-05 00:32:21.000000000 +0200
+++ screen-4.1.0~20120320gitdb59704/pty.c	2012-06-03 21:42:56.000000000 +0200
@@ -136,7 +136,7 @@
 {
   if (f < 0)
     return;
-#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__GLIBC__) && !defined(__osf__) && !defined(M_UNIX)
   if (ioctl(f, I_PUSH, "ptem"))
     Panic(errno, "InitPTY: cannot I_PUSH ptem");
   if (ioctl(f, I_PUSH, "ldterm"))
@@ -260,7 +260,7 @@
   sigret_t (*sigcld)__P(SIGPROTOARG);
 
   strcpy(PtyName, "/dev/ptmx");
-#if defined(HAVE_GETPT) && defined(linux)
+#if defined(HAVE_GETPT) && (defined(linux) || defined(__GLIBC__))
   if ((f = getpt()) == -1)
 #else
   if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)