diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-07-06 13:42:27 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-07-06 13:42:27 +0000 |
commit | 0f33904a3c45f1859d8161dec0ca55e4ed2b372b (patch) | |
tree | 2b6ef886a2dece74a3ee32eae3c05b7e30820f84 | |
parent | 0001155c8d33d4e8a1a8ea70a2f26553c741da19 (diff) |
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 |