From 9779651e2b6c06159a583d5852f1a54c000c6c8e Mon Sep 17 00:00:00 2001 From: François Revol Date: Mon, 26 Jul 2010 11:43:51 +0200 Subject: portability: fix mntent.h and pty.h usage Signed-off-by: François Revol Signed-off-by: Karel Zak --- misc-utils/script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc-utils/script.c') 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 #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) { -- cgit v1.2.3-55-g7522