Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun2/dev Fix build without kbd at zstty, simplify.



details:   https://anonhg.NetBSD.org/src/rev/8a5a21f68333
branches:  trunk
changeset: 970109:8a5a21f68333
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Mar 13 01:48:16 2020 +0000

description:
Fix build without kbd at zstty, simplify.

diffstat:

 sys/arch/sun2/dev/zsvar.h |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 0e63d49d63dc -r 8a5a21f68333 sys/arch/sun2/dev/zsvar.h
--- a/sys/arch/sun2/dev/zsvar.h Fri Mar 13 00:45:59 2020 +0000
+++ b/sys/arch/sun2/dev/zsvar.h Fri Mar 13 01:48:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zsvar.h,v 1.8 2016/07/07 06:55:38 msaitoh Exp $        */
+/*     $NetBSD: zsvar.h,v 1.9 2020/03/13 01:48:16 rin Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -44,15 +44,18 @@
 #include <dev/ic/z8530sc.h>
 #include <sun2/dev/zsreg.h>
 
+#ifdef _KERNEL_OPT
+#include "kbd.h"
+#endif
+
+#if NKBD > 0
 /*
  * Need to override cn_console_dev() for zstty and zskbd.
  */
-#ifdef cn_isconsole
+extern struct consdev *cn_hw;
 #undef cn_isconsole
+#define cn_isconsole(d)        ((d) == cn_tab->cn_dev || (d) == cn_hw->cn_dev)
 #endif
-extern struct consdev *cn_hw;
-extern struct consdev *cn_tab;
-#define cn_isconsole(d)        ((d) == cn_tab->cn_dev || (d) == cn_hw->cn_dev)
 
 struct zsc_softc {
        device_t                zsc_dev;        /* base device */



Home | Main Index | Thread Index | Old Index