summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/drm/libdrm/0001-tests-kms-steal-crtc-Include-sys-select.h.patch
blob: e4ecbac16ca7fe8e8498a07d1f5cb6ca948cb67d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From fb53d7a1be116a172b56625f290fcf88b6d158ca Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Jan 2016 05:23:00 +0000
Subject: [PATCH] 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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
---
Upstream-Status: Submitted

 configure.ac                     | 2 +-
 tests/kms/kms-steal-crtc.c       | 3 +++
 tests/kms/kms-universal-planes.c | 3 +++
 tests/modetest/modetest.c        | 3 +++
 tests/vbltest/vbltest.c          | 3 +++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 057a846..258e2f6 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 2f7f327..497772e 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 9151231..d8e5fc4 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 22e3e81..d5a4062 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 1833321..086407e 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"
-- 
2.7.0