]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: Fix missing declaration in select example.
authorCollin Funk <collin.funk1@gmail.com>
Sun, 28 Sep 2025 22:26:55 +0000 (15:26 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 30 Sep 2025 00:01:54 +0000 (17:01 -0700)
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,
          |          ^~~~~~~~~~~~~~~~~~

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

index 341b65f11d1133019b34ac0a4818c3d507b36723..db138c3ecdfecf8711a50ecae581561ae2b5d1fa 100644 (file)
@@ -16,6 +16,7 @@
 */
 
 /*@group*/
+#define _GNU_SOURCE 1
 #include <errno.h>
 #include <stdio.h>
 #include <unistd.h>