]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: Use sys/select.h instead of sys/time.h for select example.
authorCollin Funk <collin.funk1@gmail.com>
Fri, 25 Jul 2025 00:44:10 +0000 (17:44 -0700)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 4 Aug 2025 14:16:23 +0000 (11:16 -0300)
The original example works on glibc since sys/time.h includes
sys/select.h. However, since POSIX requires that select is defined in
sys/select.h this change makes the example more portable.

Reported by Gavin Smith <gavinsmith0123@gmail.com> in:
<https://lists.gnu.org/archive/html/bug-texinfo/2025-07/msg00091.html>.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
manual/examples/select.c

index 1398c7f64244c7812842dcfed0e8f3e3d0a81d0b..341b65f11d1133019b34ac0a4818c3d507b36723 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/time.h>
+#include <sys/select.h>
 /*@end group*/
 
 /*@group*/