components/desktop/xscreensaver/patches/0021-forkpty.patch
changeset 5561 0416d82f7f55
parent 5400 1199f8e91f50
child 7818 c93a988b3522
equal deleted inserted replaced
5560:61114c4b4667 5561:0416d82f7f55
       
     1 From 441a8b986e5a1d24e9930fdfd1129804d29775db Mon Sep 17 00:00:00 2001
       
     2 From: Alan Coopersmith <[email protected]>
       
     3 Date: Thu, 4 Feb 2016 13:32:28 -0800
       
     4 Subject: [PATCH] forkpty
       
     5 
       
     6 Fix builds on s12_91 & later, since configure picks up that libc has forkpty()
       
     7 but doesn't realize we stuck the required definitions in <sys/termios.h>
       
     8 instead of <pty.h> or <util.h>
       
     9 
       
    10 Sent upstream on 05 Feb 2016, no response yet.
       
    11 ---
       
    12  configure.in       | 2 +-
       
    13  utils/textclient.c | 3 +++
       
    14  2 files changed, 4 insertions(+), 1 deletion(-)
       
    15 
       
    16 diff --git a/configure.in b/configure.in
       
    17 index 873299e..f8f746b 100644
       
    18 --- a/configure.in
       
    19 +++ b/configure.in
       
    20 @@ -3547,7 +3547,7 @@ fi
       
    21  ###############################################################################
       
    22  
       
    23  PTY_LIBS=
       
    24 -AC_CHECK_HEADERS(pty.h util.h)
       
    25 +AC_CHECK_HEADERS(pty.h util.h sys/termios.h)
       
    26  AC_CHECK_X_LIB(util, forkpty,
       
    27                 [PTY_LIBS="-lutil"
       
    28                  ac_have_forkpty=yes
       
    29 diff --git a/utils/textclient.c b/utils/textclient.c
       
    30 index abb6f11..bff816e 100644
       
    31 --- a/utils/textclient.c
       
    32 +++ b/utils/textclient.c
       
    33 @@ -50,6 +50,9 @@
       
    34  # ifdef HAVE_UTIL_H
       
    35  #  include <util.h>
       
    36  # endif
       
    37 +# ifdef HAVE_SYS_TERMIOS_H
       
    38 +#  include <sys/termios.h>
       
    39 +# endif
       
    40  #endif /* HAVE_FORKPTY */
       
    41  
       
    42  #undef DEBUG
       
    43 -- 
       
    44 2.6.1
       
    45