Skip to contentSkip to conversation

Fix headers inclusion in xf86drmMode.c

PATCH New Emil Velikov 1 participant 1 message Jul 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix headers inclusion in xf86drmMode.c

From: Julien Cristau <[email protected]>

Add sys/sysctl.h to get sysctlbyname declaration on kFreeBSD

Updated by Thorsten “mirabilos” Glaser <[email protected]> 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 :-)

-Emil

 configure.ac  | 2 +-
 xf86drmMode.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
configure.ac +1 -1
index 001fd3d..2cf9a19 100644
@@ -53,7 +53,7 @@ AC_USE_SYSTEM_EXTENSIONS
 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])
xf86drmMode.c +3 -0
index f4b8d14..529429e 100644
@@ -46,6 +46,9 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif
 #include <stdio.h>
 #include <stdbool.h>
 
Signature · 6 lines
2.4.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel