[Intel-gfx] [PATCH 1/4] backlight.c: test for features

Patrick Welche prlw1 at cam.ac.uk
Mon Jan 26 04:25:40 PST 2015


Signed-off-by: Patrick Welche <prlw1 at cam.ac.uk>
---
 configure.ac    | 2 ++
 src/backlight.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 314e638..0ba56c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,8 @@ AC_ARG_ENABLE(sna,
 	      [SNA="$enableval"],
 	      [SNA=auto])
 
+AC_CHECK_HEADERS([dev/wscons/wsconsio.h])
+
 if test "x$SNA" != "xno"; then
 	AC_DEFINE(USE_SNA, 1, [Enable SNA support])
 	AC_CHECK_HEADERS([sys/sysinfo.h], AC_CHECK_MEMBERS([struct sysinfo.totalram], [], [], [[#include <sys/sysinfo.h>]]))
diff --git a/src/backlight.c b/src/backlight.c
index 9f23986..5d63b2c 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -84,7 +84,7 @@ void backlight_init(struct backlight *b)
 	b->has_power = 0;
 }
 
-#ifdef __OpenBSD__
+#ifdef HAVE_DEV_WSCONS_WSCONSIO_H
 
 #include <dev/wscons/wsconsio.h>
 #include <xf86Priv.h>
-- 
2.2.1



More information about the Intel-gfx mailing list