summaryrefslogtreecommitdiff
path: root/tools/backlight_helper.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-03-25 13:16:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-03-25 14:14:30 +0000
commitaa40f990142eb165ee7f60f08e9616bc5bebdebe (patch)
treee14453e89deeababc64342fdeb4056d3eec65bb2 /tools/backlight_helper.c
parentd85e68e2d310a5646e4e71a06edf2b21b1d18688 (diff)
Use AC_HEADER_MAJOR to find how to include major()
We need to include <sys/mkdev.h> on Solaris. Reported-by: Richard Palo <richard@netbsd.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89763 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/backlight_helper.c')
-rw-r--r--tools/backlight_helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/backlight_helper.c b/tools/backlight_helper.c
index 8b2667dc..a00f0d6b 100644
--- a/tools/backlight_helper.c
+++ b/tools/backlight_helper.c
@@ -9,6 +9,12 @@
#include <sys/types.h>
#include <sys/stat.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#define DBG 0
#if defined(__GNUC__) && (__GNUC__ > 3)