From db502bb58418b8fe4bfd829b682b8049c031b4b9 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 22 Oct 2009 14:53:13 +0000 Subject: [PATCH] Add missing variable declaration for when TIOCSCTTY is not defined. Need to include sys/termio.h for TIOCSCTTY on some systems. --- script.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/script.c b/script.c index ce15c17e9..0f57ece5b 100644 --- a/script.c +++ b/script.c @@ -21,6 +21,15 @@ #include #include #include +#ifdef HAVE_TERMIOS_H +# include +#else +# ifdef HAVE_TERMIO_H +# include +# else +# include +# endif /* HAVE_TERMIO_H */ +#endif /* HAVE_TERMIOS_H */ #include #ifdef HAVE_SYS_SELECT_H #include @@ -566,8 +575,10 @@ script_child(path, argv, rbac_enabled) { sigaction_t sa; pid_t pid; - int status; - int exitcode = 1; + int status, exitcode = 1; +#ifndef TIOCSCTTY + int n; +#endif /* Reset signal handlers. */ zero_bytes(&sa, sizeof(sa));