diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/igt_kms.c | 6 | ||||
-rw-r--r-- | tests/kms_flip.c | 4 |
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> |