summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-04-24 21:37:46 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-04-24 21:37:46 +0000
commit22ed70ce27c4051e9a44bb6a89436e743b4e9de9 (patch)
tree6c72944fe815d754a2df87bae68ebda0a69d5e86
parent6d93c95f6697280404aae88a21d541e87dee0fae (diff)
Use openpty; OK deraadt@
-rw-r--r--libexec/telnetd/sys_term.c2
-rw-r--r--libexec/telnetd/telnetd.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index 14acb909f62..bbe0b210438 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -369,7 +369,7 @@ static char *ptsname(int fd)
int getpty(int *ptynum)
{
-#ifdef __osf__ /* XXX */
+#if defined(__osf__) || defined(HAVE_OPENPTY)
int master;
int slave;
if(openpty(&master, &slave, line, 0, 0) == 0){
diff --git a/libexec/telnetd/telnetd.h b/libexec/telnetd/telnetd.h
index f16fb0013ed..e0c40f22f26 100644
--- a/libexec/telnetd/telnetd.h
+++ b/libexec/telnetd/telnetd.h
@@ -47,6 +47,8 @@
#define HAVE_UNISTD_H
#define HAVE_SYS_UTSNAME_H
#define HAVE_UNAME
+#define HAVE_UTIL_H
+#define HAVE_OPENPTY
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>