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/c447d46df0ff
branches:  trunk
changeset: 849743:c447d46df0ff
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 0edf790028f9 -r c447d46df0ff 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