[libdrm] Fix headers inclusion in xf86drmMode.c
diff mbox

Message ID 1436183131-13698-1-git-send-email-emil.l.velikov@gmail.com
State New
Headers show

Commit Message

Emil Velikov July 6, 2015, 11:45 a.m. UTC
From: Julien Cristau <jcristau@debian.org>

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).

A trivial patch picked up from the Debian guys. Julien, hope you don't 
mind :-)


 configure.ac  | 2 +-
 xf86drmMode.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff mbox

diff --git a/configure.ac b/configure.ac
index 001fd3d..2cf9a19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@  AC_USE_SYSTEM_EXTENSIONS
+AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h])
 # Initialize libtool
diff --git a/xf86drmMode.c b/xf86drmMode.c
index f4b8d14..529429e 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -46,6 +46,9 @@ 
 #include <stdint.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#include <sys/sysctl.h>
 #include <stdio.h>
 #include <stdbool.h>