From 5e0a77e7c1b16431583bd5290610f49022815631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 16 Feb 2009 19:11:09 +0000 Subject: [PATCH] Less includes for STREAMS, and let hope it work, Add missing realm. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24740 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/rkpty.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/lib/roken/rkpty.c b/lib/roken/rkpty.c index 16b10c808..f93d9e746 100644 --- a/lib/roken/rkpty.c +++ b/lib/roken/rkpty.c @@ -50,25 +50,7 @@ #endif #ifdef STREAMSPTY -#ifdef HAVE_SAC_H -#include -#endif -#ifdef HAVE_SYS_STROPTS_H -#include -#endif - -# include - -#ifdef HAVE_SYS_UIO_H -#include -#ifdef __hpux -#undef SE -#endif -#endif - -#ifdef HAVE_SYS_STREAM_H -#include -#endif +#include #endif /* STREAMPTY */ #include "roken.h" @@ -121,9 +103,8 @@ open_pty(void) "/dev/ptym/clone", NULL }; - char **q; - int p; + for(q = clone; *q; q++){ master = open(*q, O_RDWR); if(master >= 0){ @@ -136,9 +117,11 @@ open_pty(void) strlcpy(line, ptsname(master), sizeof(line)); slave = open(line, O_RDWR); if (slave < 0) - errx(1, "failed to open slave"); + errx(1, "failed to open slave when using %s", q); ioctl(slave, I_PUSH, "ptem"); ioctl(slave, I_PUSH, "ldterm"); + + return; } } }