[PATCH:intel-gpu-tools 2/7] Solaris needs to #include <sys/kd.h> instead of <linux/kd.h>
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Dec 23 19:07:09 PST 2014
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
configure.ac | 2 +-
lib/igt_kms.c | 6 +++++-
tests/kms_flip.c | 4 ++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index cdea8d5..fe46066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ enable_gtk_doc=no
# Checks for functions, headers, structures, etc.
AC_HEADER_STDC
-AC_CHECK_HEADERS([termios.h])
+AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h])
AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
#include <sys/sysinfo.h>
])
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 042e90e..d0c3690 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -25,7 +25,7 @@
* Damien Lespiau <damien.lespiau at intel.com>
*/
-#define _GNU_SOURCE
+#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
@@ -33,7 +33,11 @@
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
+#ifdef HAVE_LINUX_KD_H
#include <linux/kd.h>
+#elif HAVE_SYS_KD_H
+#include <sys/kd.h>
+#endif
#include <errno.h>
#include <time.h>
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 7e86bbe..557bcd4 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -34,7 +34,11 @@
#include <sys/poll.h>
#include <sys/time.h>
#include <sys/ioctl.h>
+#ifdef HAVE_LINUX_KD_H
#include <linux/kd.h>
+#elif HAVE_SYS_KD_H
+#include <sys/kd.h>
+#endif
#include <time.h>
#include <pthread.h>
--
1.7.9.2
More information about the xorg-devel
mailing list