diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-02 23:25:03 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-02 23:25:03 +0200 |
| commit | f2bdc79cf19f6e23395570e30f917ff2238cacf7 (patch) | |
| tree | a720e2b37a869cf47434f746efc7499352573cb4 | |
| parent | 80ae7514d6d96c2f6369c2e990ec8f5679a94a62 (diff) | |
| download | man-pages-f2bdc79cf19f6e23395570e30f917ff2238cacf7.tar.gz | |
Various pages: EXAMPLES: Fix includes
Reported-by: iwyu(1)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rw-r--r-- | man2/close_range.2 | 5 | ||||
| -rw-r--r-- | man2/process_vm_readv.2 | 2 | ||||
| -rw-r--r-- | man2/recvmmsg.2 | 4 | ||||
| -rw-r--r-- | man2/seccomp_unotify.2 | 5 | ||||
| -rw-r--r-- | man2/sendmmsg.2 | 5 | ||||
| -rw-r--r-- | man2/shmop.2 | 12 |
6 files changed, 25 insertions, 8 deletions
diff --git a/man2/close_range.2 b/man2/close_range.2 index 8f3214b439..bfc1aaabac 100644 --- a/man2/close_range.2 +++ b/man2/close_range.2 @@ -201,14 +201,13 @@ result from the calls to .\" SRC BEGIN (close_range.c) .EX #define _GNU_SOURCE +#include <dirent.h> #include <fcntl.h> -#include <linux/close_range.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <sys/syscall.h> -#include <string.h> #include <unistd.h> -#include <dirent.h> /* Show the contents of the symbolic links in /proc/self/fd */ diff --git a/man2/process_vm_readv.2 b/man2/process_vm_readv.2 index 6e9fb38450..aff2f706ff 100644 --- a/man2/process_vm_readv.2 +++ b/man2/process_vm_readv.2 @@ -289,6 +289,8 @@ and the second 10 bytes into .PP .\" SRC BEGIN (process_vm_readv.c) .EX +#include <stdlib.h> +#include <sys/types.h> #include <sys/uio.h> int diff --git a/man2/recvmmsg.2 b/man2/recvmmsg.2 index 8011d5f04b..a087ec4dea 100644 --- a/man2/recvmmsg.2 +++ b/man2/recvmmsg.2 @@ -209,11 +209,13 @@ can give the following output: .\" SRC BEGIN (recvmmsg.c) .EX #define _GNU_SOURCE -#include <netinet/ip.h> +#include <arpa/inet.h> +#include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> +#include <time.h> int main(void) diff --git a/man2/seccomp_unotify.2 b/man2/seccomp_unotify.2 index db4597cb2f..5f98b0cf9a 100644 --- a/man2/seccomp_unotify.2 +++ b/man2/seccomp_unotify.2 @@ -1406,13 +1406,14 @@ T: terminating #include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include <sys/socket.h> +#include <string.h> #include <sys/ioctl.h> #include <sys/prctl.h> +#include <sys/socket.h> #include <sys/stat.h> +#include <sys/syscall.h> #include <sys/types.h> #include <sys/un.h> -#include <sys/syscall.h> #include <unistd.h> #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e diff --git a/man2/sendmmsg.2 b/man2/sendmmsg.2 index 7b8d03c635..3e10065780 100644 --- a/man2/sendmmsg.2 +++ b/man2/sendmmsg.2 @@ -170,12 +170,13 @@ The contents of the first datagram originates from a pair of buffers. .\" SRC BEGIN (sendmmsg.c) .EX #define _GNU_SOURCE -#include <netinet/ip.h> +#include <arpa/inet.h> +#include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <sys/socket.h> +#include <sys/types.h> int main(void) diff --git a/man2/shmop.2 b/man2/shmop.2 index 1bf18968d1..74d56d4be3 100644 --- a/man2/shmop.2 +++ b/man2/shmop.2 @@ -357,6 +357,12 @@ shared memory segment by the "writer". Licensed under GNU General Public License v2 or later. */ +#include <stdio.h> +#include <stdlib.h> +#include <sys/ipc.h> +#include <sys/sem.h> +#include <sys/shm.h> + #include "svshm_string.h" int @@ -433,6 +439,12 @@ and then decrements the semaphore value to 0 in order to inform the Licensed under GNU General Public License v2 or later. */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/sem.h> +#include <sys/shm.h> + #include "svshm_string.h" int |
