From 0320049eac3618e0c4ee3ffdc70062e19e0ba33f Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 2 May 2024 01:03:49 +0200 Subject: man/: EXAMPLES: Add missing includes Link: Link: Reported-by: iwyu(1) (`make lint-c-iwyu`) Signed-off-by: Alejandro Colomar --- man/man2/chown.2 | 1 + man/man2/clone.2 | 1 + man/man2/close_range.2 | 1 + man/man2/copy_file_range.2 | 1 + man/man2/eventfd.2 | 1 + man/man2/fork.2 | 1 + man/man2/getdents.2 | 1 + man/man2/kcmp.2 | 1 + man/man2/memfd_create.2 | 1 + man/man2/mmap.2 | 1 + man/man2/open_by_handle_at.2 | 1 + man/man2/perf_event_open.2 | 1 + man/man2/pidfd_open.2 | 1 + man/man2/pipe.2 | 1 + man/man2/poll.2 | 1 + man/man2/readlink.2 | 1 + man/man2/select_tut.2 | 1 + man/man2/signalfd.2 | 1 + man/man2/syscall.2 | 1 + man/man2/tee.2 | 1 + man/man2/timerfd_create.2 | 1 + man/man2/wait.2 | 1 + man/man3/pthread_create.3 | 1 + man/man7/unix.7 | 2 ++ 24 files changed, 25 insertions(+) diff --git a/man/man2/chown.2 b/man/man2/chown.2 index ffba3acaf..e7e55c9b6 100644 --- a/man/man2/chown.2 +++ b/man/man2/chown.2 @@ -427,6 +427,7 @@ to perform a lookup in the system password file). #include #include #include +#include #include \& int diff --git a/man/man2/clone.2 b/man/man2/clone.2 index e88c54eeb..5a4add238 100644 --- a/man/man2/clone.2 +++ b/man/man2/clone.2 @@ -1850,6 +1850,7 @@ so we should include it for portability. #include #include #include +#include #include #include #include diff --git a/man/man2/close_range.2 b/man/man2/close_range.2 index c5252d660..9806638bd 100644 --- a/man/man2/close_range.2 +++ b/man/man2/close_range.2 @@ -209,6 +209,7 @@ result from the calls to #include #include #include +#include #include \& /* Show the contents of the symbolic links in /proc/self/fd */ diff --git a/man/man2/copy_file_range.2 b/man/man2/copy_file_range.2 index 913d94345..50ecef77c 100644 --- a/man/man2/copy_file_range.2 +++ b/man/man2/copy_file_range.2 @@ -252,6 +252,7 @@ the call failed to copy, while still reporting success. #include #include #include +#include #include \& int diff --git a/man/man2/eventfd.2 b/man/man2/eventfd.2 index 3b67239ac..48e9e2ac6 100644 --- a/man/man2/eventfd.2 +++ b/man/man2/eventfd.2 @@ -385,6 +385,7 @@ Parent read 28 (0x1c) from efd #include #include #include +#include #include \& int diff --git a/man/man2/fork.2 b/man/man2/fork.2 index b5a7816a0..bf491857f 100644 --- a/man/man2/fork.2 +++ b/man/man2/fork.2 @@ -307,6 +307,7 @@ for more examples. #include #include #include +#include #include \& int diff --git a/man/man2/getdents.2 b/man/man2/getdents.2 index 1e630f9e2..421318e5e 100644 --- a/man/man2/getdents.2 +++ b/man/man2/getdents.2 @@ -262,6 +262,7 @@ inode# file type d_reclen d_off d_name #include #include #include +#include #include \& struct linux_dirent { diff --git a/man/man2/kcmp.2 b/man/man2/kcmp.2 index 0ea604eac..33d4a25e1 100644 --- a/man/man2/kcmp.2 +++ b/man/man2/kcmp.2 @@ -347,6 +347,7 @@ Child duplicated FD 3 to create FD 5 #include #include #include +#include #include #include \& diff --git a/man/man2/memfd_create.2 b/man/man2/memfd_create.2 index 794aa0e54..55cb59ef0 100644 --- a/man/man2/memfd_create.2 +++ b/man/man2/memfd_create.2 @@ -417,6 +417,7 @@ Existing seals: WRITE SHRINK #include #include #include +#include #include \& int diff --git a/man/man2/mmap.2 b/man/man2/mmap.2 index 63df5a98a..f4cecbefb 100644 --- a/man/man2/mmap.2 +++ b/man/man2/mmap.2 @@ -940,6 +940,7 @@ to output the desired bytes. #include #include #include +#include #include \& #define handle_error(msg) \e diff --git a/man/man2/open_by_handle_at.2 b/man/man2/open_by_handle_at.2 index a4050d664..8fa1bf630 100644 --- a/man/man2/open_by_handle_at.2 +++ b/man/man2/open_by_handle_at.2 @@ -641,6 +641,7 @@ main(int argc, char *argv[]) #include #include #include +#include #include \& /* Scan /proc/self/mountinfo to find the line whose mount ID matches diff --git a/man/man2/perf_event_open.2 b/man/man2/perf_event_open.2 index 5f68f5204..37272edc3 100644 --- a/man/man2/perf_event_open.2 +++ b/man/man2/perf_event_open.2 @@ -3976,6 +3976,7 @@ instruction count of a call to #include #include #include +#include #include \& static long diff --git a/man/man2/pidfd_open.2 b/man/man2/pidfd_open.2 index 02c741f2b..4f2b4c6d8 100644 --- a/man/man2/pidfd_open.2 +++ b/man/man2/pidfd_open.2 @@ -214,6 +214,7 @@ event. #include #include #include +#include #include \& static int diff --git a/man/man2/pipe.2 b/man/man2/pipe.2 index a440ad401..b354775ce 100644 --- a/man/man2/pipe.2 +++ b/man/man2/pipe.2 @@ -246,6 +246,7 @@ and echoes it on standard output. #include #include #include +#include #include #include \& diff --git a/man/man2/poll.2 b/man/man2/poll.2 index f1a5a9795..4472baf3e 100644 --- a/man/man2/poll.2 +++ b/man/man2/poll.2 @@ -563,6 +563,7 @@ at which point the file descriptor was closed and the program terminated. #include #include #include +#include #include \& #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e diff --git a/man/man2/readlink.2 b/man/man2/readlink.2 index da671a9be..9c616f6ed 100644 --- a/man/man2/readlink.2 +++ b/man/man2/readlink.2 @@ -260,6 +260,7 @@ reports a size of zero. #include #include #include +#include #include \& int diff --git a/man/man2/select_tut.2 b/man/man2/select_tut.2 index 59c241973..4ef523ead 100644 --- a/man/man2/select_tut.2 +++ b/man/man2/select_tut.2 @@ -344,6 +344,7 @@ from one TCP port to another. #include #include #include +#include #include \& static int forward_port; diff --git a/man/man2/signalfd.2 b/man/man2/signalfd.2 index 831fa944c..cf0e6df28 100644 --- a/man/man2/signalfd.2 +++ b/man/man2/signalfd.2 @@ -469,6 +469,7 @@ $ #include #include #include +#include #include \& int diff --git a/man/man2/syscall.2 b/man/man2/syscall.2 index 82f02ebe1..cd69f6b63 100644 --- a/man/man2/syscall.2 +++ b/man/man2/syscall.2 @@ -347,6 +347,7 @@ architectures may indiscriminately clobber other registers not listed here. #define _GNU_SOURCE #include #include +#include #include \& int diff --git a/man/man2/tee.2 b/man/man2/tee.2 index 8ed9a67a8..18f6b39a0 100644 --- a/man/man2/tee.2 +++ b/man/man2/tee.2 @@ -140,6 +140,7 @@ Tue Oct 28 10:06:00 CET 2014 #include #include #include +#include #include \& int diff --git a/man/man2/timerfd_create.2 b/man/man2/timerfd_create.2 index 23c399c7d..8d3fd0da4 100644 --- a/man/man2/timerfd_create.2 +++ b/man/man2/timerfd_create.2 @@ -604,6 +604,7 @@ a.out 3 1 100 #include #include #include +#include #include #include \& diff --git a/man/man2/wait.2 b/man/man2/wait.2 index 2e0e9c254..ff68f2ddb 100644 --- a/man/man2/wait.2 +++ b/man/man2/wait.2 @@ -661,6 +661,7 @@ $ #include #include #include +#include #include #include \& diff --git a/man/man3/pthread_create.3 b/man/man3/pthread_create.3 index fd6253bf4..793939b7f 100644 --- a/man/man3/pthread_create.3 +++ b/man/man3/pthread_create.3 @@ -257,6 +257,7 @@ Joined with thread 3; returned value was SERVUS #include #include #include +#include #include \& #define handle_error_en(en, msg) \e diff --git a/man/man7/unix.7 b/man/man7/unix.7 index 642b0b37e..433ac02f4 100644 --- a/man/man7/unix.7 +++ b/man/man7/unix.7 @@ -980,6 +980,7 @@ $ #include #include #include +#include #include #include \& @@ -1125,6 +1126,7 @@ main(void) #include #include #include +#include #include #include \& -- cgit v1.2.3