File:
[cvs.NetBSD.org] /
pkgsrc /
sysutils /
tits /
patches /
Attic /
patch-ag
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Mon Jan 10 12:47:03 2011 UTC (13 years, 10 months ago) by
obache
Branches:
MAIN
CVS tags:
pkgsrc-2015Q1-base,
pkgsrc-2015Q1,
pkgsrc-2014Q4-base,
pkgsrc-2014Q4,
pkgsrc-2014Q3-base,
pkgsrc-2014Q3,
pkgsrc-2014Q2-base,
pkgsrc-2014Q2,
pkgsrc-2014Q1-base,
pkgsrc-2014Q1,
pkgsrc-2013Q4-base,
pkgsrc-2013Q4,
pkgsrc-2013Q3-base,
pkgsrc-2013Q3,
pkgsrc-2013Q2-base,
pkgsrc-2013Q2,
pkgsrc-2013Q1-base,
pkgsrc-2013Q1,
pkgsrc-2012Q4-base,
pkgsrc-2012Q4,
pkgsrc-2012Q3-base,
pkgsrc-2012Q3,
pkgsrc-2012Q2-base,
pkgsrc-2012Q2,
pkgsrc-2012Q1-base,
pkgsrc-2012Q1,
pkgsrc-2011Q4-base,
pkgsrc-2011Q4,
pkgsrc-2011Q3-base,
pkgsrc-2011Q3,
pkgsrc-2011Q2-base,
pkgsrc-2011Q2,
pkgsrc-2011Q1-base,
pkgsrc-2011Q1,
pkgsrc-2010Q4-base,
pkgsrc-2010Q4,
HEAD
Fixes build on DraognFly (and other than NetBSD).
Based on PR#44346 by Tony Young.
$NetBSD: patch-ag,v 1.1 2011/01/10 12:47:03 obache Exp $
* only for TIOCGFLAGS avalilable.
--- tty.c.orig 2006-03-19 11:32:48.000000000 +0000
+++ tty.c
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/filio.h>
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <assert.h>
#include <ctype.h>
@@ -318,7 +319,9 @@ tty_open_device(struct client_ctx *cc)
{
struct tty_ctx *tc = cc->cc_data;
struct termios tent;
+#ifdef TIOCGFLAGS
int flags;
+#endif
int fd, fd2;
if (tc->tc_open)
@@ -369,7 +372,11 @@ tty_open_device(struct client_ctx *cc)
* If this is *not* a pseudo tty, ensure DTR is asserted.
* Note: This relies on TIOCGFLAGS returning ENOTTY for pty(4)'s.
*/
+#ifdef TIOCGFLAGS
if (ioctl(fd, TIOCGFLAGS, &flags) == 0 && errno == ENOTTY &&
+#else
+ if (
+#endif
ioctl(fd, TIOCSDTR, 0) < 0) {
syslog(LOG_ALERT, "tty_open_device(): assert DTR failed (%d)",
errno);
CVSweb <webmaster@jp.NetBSD.org>