diff --git a/sys/isa/pnpreg.h b/sys/isa/pnpreg.h
index c5324f6c1d89..04d6131000fe 100644
--- a/sys/isa/pnpreg.h
+++ b/sys/isa/pnpreg.h
@@ -48,8 +48,7 @@
 #endif
 
 /* Static ports to access PnP state machine */
-#if defined(PC98) && defined(_KERNEL)
-/* pnp.h is included from pnpinfo.c. */
+#ifdef PC98
 #define _PNP_ADDRESS		0x259
 #define _PNP_WRITE_DATA		0xa59
 #else
diff --git a/usr.sbin/pnpinfo/Makefile b/usr.sbin/pnpinfo/Makefile
index 6cc8c97ff3ea..ca49b4bbc5a0 100644
--- a/usr.sbin/pnpinfo/Makefile
+++ b/usr.sbin/pnpinfo/Makefile
@@ -6,6 +6,10 @@ SRCS=	pnpinfo.c
 CFLAGS+=-I${.CURDIR}/../../sys
 MAN8=	pnpinfo.8
 
+.if ${MACHINE} == "pc98"
+CFLAGS+= -DPC98
+.endif
+
 .if ${MACHINE_ARCH} == "alpha"
 LDADD+=	-lio
 .endif