]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various pages: EXAMPLES: Fix includes
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 2 May 2022 21:25:03 +0000 (23:25 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 2 May 2022 21:25:03 +0000 (23:25 +0200)
Reported-by: iwyu(1)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
man2/close_range.2
man2/process_vm_readv.2
man2/recvmmsg.2
man2/seccomp_unotify.2
man2/sendmmsg.2
man2/shmop.2

index 8f3214b4394d5ca35147194094844937409a8847..bfc1aaabac168a1fc5019e892ad9af8dd4f3e465 100644 (file)
@@ -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 */
 
index 6e9fb384509e6d77ef2ca836b8f76ee393432cbc..aff2f706ff8196bdd0dcaf842b4fcc139ab55dff 100644 (file)
@@ -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
index 8011d5f04b1f54bc95dbf380ab9b828cbd293aec..a087ec4deaea05f591f61e1c366a9158720e83c2 100644 (file)
@@ -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)
index db4597cb2f55d4aa64d2c4559fc7521849df1910..5f98b0cf9abb83ce620cd758cb225f2f780c6825 100644 (file)
@@ -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
index 7b8d03c63538947fe3eea8ef568b155395fc8fb8..3e100657804f97bf10f2a850b7c34e1daef0e826 100644 (file)
@@ -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)
index 1bf18968d1689c2e6e9ed3625b852b778e78958e..74d56d4be3ec37c39cd2ba4baa361bdf6e374894 100644 (file)
@@ -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