about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--misc/tst-fdset.c2
-rw-r--r--nptl/pthread_join_common.c2
-rw-r--r--nptl/tst-cancel4.c1
-rw-r--r--posix/sys/types.h3
-rwxr-xr-xscripts/check-c++-types.sh1
-rwxr-xr-xscripts/check-obsolete-constructs.py6
-rw-r--r--socket/sys/socket.h4
-rw-r--r--sunrpc/rpc/svc.h1
-rw-r--r--sysdeps/nptl/thread_db.h2
9 files changed, 14 insertions, 8 deletions
diff --git a/misc/tst-fdset.c b/misc/tst-fdset.c
index eace688767..62ac4c240e 100644
--- a/misc/tst-fdset.c
+++ b/misc/tst-fdset.c
@@ -18,7 +18,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
-#include <sys/types.h>
+#include <sys/select.h>
 
 static int
 do_test (void)
diff --git a/nptl/pthread_join_common.c b/nptl/pthread_join_common.c
index a96ceafde4..29af4d2780 100644
--- a/nptl/pthread_join_common.c
+++ b/nptl/pthread_join_common.c
@@ -21,6 +21,8 @@
 #include <stap-probe.h>
 #include <time.h>
 
+#include <sys/time.h>
+
 static void
 cleanup (void *arg)
 {
diff --git a/nptl/tst-cancel4.c b/nptl/tst-cancel4.c
index 652668537a..5ede8a0caa 100644
--- a/nptl/tst-cancel4.c
+++ b/nptl/tst-cancel4.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/ipc.h>
diff --git a/posix/sys/types.h b/posix/sys/types.h
index 64fa010114..f7ce0c68a8 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -93,9 +93,6 @@ __BEGIN_DECLS
 
 /* In BSD <sys/types.h> is expected to define BYTE_ORDER.  */
 # include <endian.h>
-
-/* It also defines `fd_set' and the FD_* macros for `select'.  */
-# include <sys/select.h>
 #endif /* Use misc.  */
 
 __END_DECLS
diff --git a/scripts/check-c++-types.sh b/scripts/check-c++-types.sh
index d868204abe..ebf4fd1818 100755
--- a/scripts/check-c++-types.sh
+++ b/scripts/check-c++-types.sh
@@ -46,6 +46,7 @@ while read t; do
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/resource.h>
+#include <sys/select.h>
 #include <unistd.h>
 void foo ($t) { }
 EOF
diff --git a/scripts/check-obsolete-constructs.py b/scripts/check-obsolete-constructs.py
index dfe0d0fff5..77999d8c6f 100755
--- a/scripts/check-obsolete-constructs.py
+++ b/scripts/check-obsolete-constructs.py
@@ -530,13 +530,13 @@ HEADER_ALLOWED_INCLUDES = {
     # mandated: sys/msg.h -> sys/ipc.h
     #           sys/sem.h -> sys/ipc.h
     #           sys/shm.h -> sys/ipc.h
-    # allowed:  sys/time.h -> sys/select.h
-    #           sys/wait.h -> signal.h
+    #           sys/time.h -> sys/select.h (effectively)
+    # allowed:  sys/wait.h -> signal.h
     "sys/msg.h":                   [ "sys/ipc.h" ],
     "sys/sem.h":                   [ "sys/ipc.h" ],
     "sys/shm.h":                   [ "sys/ipc.h" ],
     "sys/time.h":                  [ "sys/select.h" ],
-    "sys/types.h":                 [ "endian.h", "sys/select.h" ],
+    "sys/types.h":                 [ "endian.h" ],
     "sys/uio.h":                   [ "sys/types.h" ],
     "sys/un.h":                    [ "string.h" ],
     "sys/wait.h":                  [ "signal.h" ],
diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index 0c158d1e93..305e6201f9 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -35,6 +35,10 @@ __BEGIN_DECLS
 # include <bits/types/struct_osockaddr.h>
 #endif
 
+#ifdef __USE_GNU
+struct timespec;
+#endif
+
 /* The following constants should be used for the second parameter of
    `shutdown'.  */
 enum
diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h
index ea2ba71906..2dd9d87881 100644
--- a/sunrpc/rpc/svc.h
+++ b/sunrpc/rpc/svc.h
@@ -53,6 +53,7 @@
 
 #include <features.h>
 #include <rpc/rpc_msg.h>
+#include <sys/select.h>
 
 __BEGIN_DECLS
 
diff --git a/sysdeps/nptl/thread_db.h b/sysdeps/nptl/thread_db.h
index 7418344d8b..bf073b7d86 100644
--- a/sysdeps/nptl/thread_db.h
+++ b/sysdeps/nptl/thread_db.h
@@ -26,7 +26,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 #include <sys/procfs.h>
-
+#include <bits/types/sigset_t.h>
 
 /* Error codes of the library.  */
 typedef enum