aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/lib/openpty.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 79db4323..59a7ea4c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * lib/openpty.c: #include <sys/ioctl.h>, <termios.h>, and
+ <libutil.h> where available.
+
+2009-02-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/i-spec2.boot (upDollar): Fix thinko.
* interp/compat.boot (editFile): Tidy.
* interp/br-op2.boot (modemap2Sig): Don't update $badStack.xo
diff --git a/src/lib/openpty.c b/src/lib/openpty.c
index eee46d04..5cf36c34 100644
--- a/src/lib/openpty.c
+++ b/src/lib/openpty.c
@@ -38,12 +38,22 @@
#include <fcntl.h>
#include <string.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
#ifdef HAVE_PTY_H
# include <pty.h>
#endif
#ifdef HAVE_UTIL_H
# include <util.h>
#endif
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+#ifdef HAVE_LIBUTIL_H
+# include <libutil.h>
+#endif
+
#include "openpty.H1"
@@ -136,7 +146,7 @@ extern char* ptsname(int);
return(fdm);
#endif
-# error "don't know open to open a pty"
+# error "don't know how to open a pty"
#endif
}