diff options
author | François Revol | 2010-07-26 11:43:51 +0200 |
---|---|---|
committer | Karel Zak | 2010-07-26 11:43:51 +0200 |
commit | 9779651e2b6c06159a583d5852f1a54c000c6c8e (patch) | |
tree | 41cc3a9ead218adc134cfe3104eb4748cea02410 /misc-utils/script.c | |
parent | portability: use standard constants (diff) | |
download | kernel-qcow2-util-linux-9779651e2b6c06159a583d5852f1a54c000c6c8e.tar.gz kernel-qcow2-util-linux-9779651e2b6c06159a583d5852f1a54c000c6c8e.tar.xz kernel-qcow2-util-linux-9779651e2b6c06159a583d5852f1a54c000c6c8e.zip |
portability: fix mntent.h and pty.h usage
Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/script.c')
-rw-r--r-- | misc-utils/script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc-utils/script.c b/misc-utils/script.c index 2028db664..9367fafbc 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -59,7 +59,7 @@ #include "nls.h" -#ifdef HAVE_LIBUTIL +#if HAVE_LIBUTIL && HAVE_PTY_H #include <pty.h> #endif @@ -91,7 +91,7 @@ struct termios tt; struct winsize win; int lb; int l; -#ifndef HAVE_LIBUTIL +#if !HAVE_LIBUTIL || !HAVE_PTY_H char line[] = "/dev/ptyXX"; #endif int aflg = 0; @@ -467,7 +467,7 @@ done() { void getmaster() { -#ifdef HAVE_LIBUTIL +#if HAVE_LIBUTIL && HAVE_PTY_H (void) tcgetattr(0, &tt); (void) ioctl(0, TIOCGWINSZ, (char *)&win); if (openpty(&master, &slave, NULL, &tt, &win) < 0) { |