[PATCH 10/13] manual: Fix missing declaration in select example.
Collin Funk
collin.funk1@gmail.com
Sun Sep 28 22:46:03 GMT 2025
Without _GNU_SOURCE defined this file fails to compile with the
following error:
$ gcc manual/examples/select.c
manual/examples/select.c: In function ‘input_timeout’:
manual/examples/select.c:44:10: error: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
44 | return TEMP_FAILURE_RETRY (select (FD_SETSIZE,
| ^~~~~~~~~~~~~~~~~~
---
manual/examples/select.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/manual/examples/select.c b/manual/examples/select.c
index 341b65f11d..db138c3ecd 100644
--- a/manual/examples/select.c
+++ b/manual/examples/select.c
@@ -16,6 +16,7 @@
*/
/*@group*/
+#define _GNU_SOURCE 1
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
--
2.51.0
More information about the Libc-alpha
mailing list