Skip to contentSkip to conversation

tests: Include sys/select.h

PATCH In review Khem Raj 2 participants 2 messages Jan 20, 2016 – Jan 26, 2016

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 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

---
 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(-)
configure.ac +1 -1
index 057a846..258e2f6 100644
@@ -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])
tests/kms/kms-steal-crtc.c +3 -0
index 2f7f327..497772e 100644
@@ -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>
 
tests/kms/kms-universal-planes.c +3 -0
index 9151231..d8e5fc4 100644
@@ -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"
tests/modetest/modetest.c +3 -0
index 22e3e81..d5a4062 100644
@@ -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"
tests/vbltest/vbltest.c +3 -0
index 1833321..086407e 100644
@@ -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"
Signature · 6 lines
2.7.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Raj,

Quoted 7 lines · Khem Raj

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

Thanks for updating the patch. I've added a line of commit history and I'll push this shortly.

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel