summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-23 19:07:09 -0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-06 09:29:45 +0100
commitcf93bc8df9f5f94a0aedc8b52bad0ad4e036737c (patch)
treeaf848543efbb9d7a915a05b5117cd36460e17029
parentf7766d1c77ffef757e05cbd6c6ed110cdd830045 (diff)
Solaris needs to #include <sys/kd.h> instead of <linux/kd.h>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--configure.ac2
-rw-r--r--lib/igt_kms.c6
-rw-r--r--tests/kms_flip.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index cdea8d5e..fe460666 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 042e90e1..d0c36907 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -25,7 +25,7 @@
* Damien Lespiau <damien.lespiau@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 7e86bbea..557bcd4a 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>