]> granicus.if.org Git - sudo/commitdiff
Add missing variable declaration for when TIOCSCTTY is not defined.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 22 Oct 2009 14:53:13 +0000 (14:53 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 22 Oct 2009 14:53:13 +0000 (14:53 +0000)
Need to include sys/termio.h for TIOCSCTTY on some systems.

script.c

index ce15c17e921df32cd69e9e0bb84ceec76504a7cc..0f57ece5b7708eaefde8b497ebc071d2ec42b587 100644 (file)
--- a/script.c
+++ b/script.c
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#else
+# ifdef HAVE_TERMIO_H
+#  include <termio.h>
+# else
+#  include <sgtty.h>
+# endif /* HAVE_TERMIO_H */
+#endif /* HAVE_TERMIOS_H */
 #include <sys/ioctl.h>
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
@@ -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));