Fix headers inclusion in xf86drmMode.c
Add sys/sysctl.h to get sysctlbyname declaration on kFreeBSD
Updated by Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
to add autoconf check and only include <sys/sysctl.h> if it
is detected by configure as it’s unusable on Linux/x32 (and
others, e.g. other new architectures).
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
diff --git a/configure.ac b/configure.ac
index 001fd3d..2cf9a19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@
AC_SYS_LARGEFILE
AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([sys/mkdev.h])
+AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h])
# Initialize libtool
LT_PREREQ([2.2])