]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: fix missing include in sigh1 example.
authorCollin Funk <collin.funk1@gmail.com>
Sun, 28 Sep 2025 22:20:37 +0000 (15:20 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 30 Sep 2025 00:01:54 +0000 (17:01 -0700)
Previously this file would fail to compile with the following error:

    $ gcc manual/examples/sigh1.c
    manual/examples/sigh1.c: In function ‘main’:
    manual/examples/sigh1.c:46:3: error: implicit declaration of function ‘alarm’ [-Wimplicit-function-declaration]
       46 |   alarm (2);
          |   ^~~~~

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

index a5406510587b7a8f65fac05a9d7bfff622912d85..b770158c2b2f220e0e3be0a0eeeff191080b88ce 100644 (file)
@@ -18,6 +18,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 /* This flag controls termination of the main loop. */
 volatile sig_atomic_t keep_going = 1;