diff options
author | 1998-07-06 13:42:24 +0000 | |
---|---|---|
committer | 1998-07-06 13:42:24 +0000 | |
commit | cbdf792ffbd27368a191be0697a7358c9afbe380 (patch) | |
tree | 3850f25ccec99d89dd67fb790c7430d8fd7faf40 | |
parent | sync (diff) | |
download | wireguard-openbsd-cbdf792ffbd27368a191be0697a7358c9afbe380.tar.xz wireguard-openbsd-cbdf792ffbd27368a191be0697a7358c9afbe380.zip |
Some ports uses kbd since they have pc style keyboard interfaces but
they don't use pcvt which is i386 specific. Fixed with a define:
-DHAVEPCVT.
-rw-r--r-- | sbin/kbd/Makefile | 7 | ||||
-rw-r--r-- | sbin/kbd/kbd_i386.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sbin/kbd/Makefile b/sbin/kbd/Makefile index 9e3cf9fcab9..2a4646e9710 100644 --- a/sbin/kbd/Makefile +++ b/sbin/kbd/Makefile @@ -1,10 +1,15 @@ -# $OpenBSD: Makefile,v 1.4 1997/09/21 11:36:52 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 1998/07/06 13:42:24 pefo Exp $ PROG= kbd MAN= kbd.8 SRCS= main.c CFLAGS+=-I${.CURDIR} + +.if (${MACHINE} == "i386") +CFLAGS+=-DHAVEPCVT +.endif + .if (${MACHINE} == "i386") || (${MACHINE} == "arc") SRCS+= kbd_i386.c .else diff --git a/sbin/kbd/kbd_i386.c b/sbin/kbd/kbd_i386.c index 76cd8314b1f..bcdb59a8ce4 100644 --- a/sbin/kbd/kbd_i386.c +++ b/sbin/kbd/kbd_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd_i386.c,v 1.7 1998/05/29 00:42:53 mickey Exp $ */ +/* $OpenBSD: kbd_i386.c,v 1.8 1998/07/06 13:42:26 pefo Exp $ */ /* * Copyright (c) 1996 Juergen Hannken-Illjes @@ -34,7 +34,9 @@ #include <sys/types.h> #include <machine/pccons.h> +#ifdef HAVEPCVT #include <machine/pcvt_ioctl.h> +#endif #include <paths.h> #include <unistd.h> #include <fcntl.h> @@ -76,9 +78,13 @@ extern char *__progname; int ispcvt() { +#ifdef HAVEPCVT struct pcvtid pcvtid; return ioctl(0, VGAPCVTID, &pcvtid); +#else + return(-1); +#endif } void |