summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-20 05:35:11 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-26 21:50:17 +0000
commit358615f416a8f3085a63c03a55564f71946083d1 (patch)
treead81522a5fb6e33693050cd7790a9fe327c40e26
parent1674147a149c2165a927a5d8eb0db4eee1f6a4e3 (diff)
tests: Include sys/select.h
Used in compliance with POSIX 2001/2008 Fixes errors e.g. error: implicit declaration of function 'select' and helps with missing definitions of FD_* defines v2: conditionally include sys/select.h, include in every test where needed. Signed-off-by: Khem Raj <raj.khem@gmail.com> Reviewed-by: Thierry Reding <thierry.reding@gmail.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--configure.ac2
-rw-r--r--tests/kms/kms-steal-crtc.c3
-rw-r--r--tests/kms/kms-universal-planes.c3
-rw-r--r--tests/modetest/modetest.c3
-rw-r--r--tests/vbltest/vbltest.c3
5 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a09be61e..4635d182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h])
+AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h sys/select.h])
# Initialize libtool
LT_PREREQ([2.2])
diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c
index 2f7f327e..497772e2 100644
--- a/tests/kms/kms-steal-crtc.c
+++ b/tests/kms/kms-steal-crtc.c
@@ -31,6 +31,9 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#include <drm_fourcc.h>
diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c
index 9151231f..d8e5fc48 100644
--- a/tests/kms/kms-universal-planes.c
+++ b/tests/kms/kms-universal-planes.c
@@ -32,6 +32,9 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#include <drm_fourcc.h>
#include "xf86drm.h"
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index f665240a..b8aa94b1 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -55,6 +55,9 @@
#include <errno.h>
#include <sys/poll.h>
#include <sys/time.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#include "xf86drm.h"
#include "xf86drmMode.h"
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c
index 4475b49b..97dd44dc 100644
--- a/tests/vbltest/vbltest.c
+++ b/tests/vbltest/vbltest.c
@@ -37,6 +37,9 @@
#include <errno.h>
#include <sys/poll.h>
#include <sys/time.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#include "xf86drm.h"
#include "xf86drmMode.h"