summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/backlight.c6
-rw-r--r--src/intel_device.c6
-rw-r--r--tools/backlight_helper.c6
4 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1bb64fc7..9aadd028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,6 +417,7 @@ AC_ARG_ENABLE(sna,
[SNA=auto])
AC_CHECK_HEADERS([dev/wscons/wsconsio.h alloca.h])
+AC_HEADER_MAJOR
if test "x$SNA" != "xno"; then
AC_DEFINE(USE_SNA, 1, [Enable SNA support])
diff --git a/src/backlight.c b/src/backlight.c
index 5d63b2cf..84d8f761 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -34,6 +34,12 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/intel_device.c b/src/intel_device.c
index 76b08315..f1a6887d 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -38,6 +38,12 @@
#include <dirent.h>
#include <errno.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#include <pciaccess.h>
#include <xorg-server.h>
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)