aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/powerd
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2010-02-04 07:26:26 +0000
committerWarner Losh <imp@FreeBSD.org>2010-02-04 07:26:26 +0000
commit7a377edc318a1174297fece77894eb66fe05d8dd (patch)
treea3f33c728c28d5ace5276f00ab7c326b0727c241 /usr.sbin/powerd
parent6ca3abc9bb438286fe1ead6ad9cb98f51654b549 (diff)
downloadsrc-7a377edc318a1174297fece77894eb66fe05d8dd.tar.gz
src-7a377edc318a1174297fece77894eb66fe05d8dd.zip
Since APM is a legacy technology, that won't be adapted to other
platforms, move the test for i386 from the Makefile to powerd.c. The powerpc specific checks are already done this way...
Notes
Notes: svn path=/head/; revision=203482
Diffstat (limited to 'usr.sbin/powerd')
-rw-r--r--usr.sbin/powerd/Makefile4
-rw-r--r--usr.sbin/powerd/powerd.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/powerd/Makefile b/usr.sbin/powerd/Makefile
index b1d8d112f610..62f8da1ba1a4 100644
--- a/usr.sbin/powerd/Makefile
+++ b/usr.sbin/powerd/Makefile
@@ -6,8 +6,4 @@ MAN= powerd.8
DPADD= ${LIBUTIL}
LDADD= -lutil
-.if ${MACHINE_ARCH} == "i386"
-CFLAGS+=-DUSE_APM
-.endif
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index 59ac1caaf692..b4ba05d7a963 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -46,6 +46,10 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
+#ifdef __i386__
+#define USE_APM
+#endif
+
#ifdef USE_APM
#include <machine/apm_bios.h>
#endif