diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 21:17:12 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 21:17:12 +0100 |
| commit | b5cd18739a64c8d923a55b61c89ae3900faafd84 (patch) | |
| tree | d192f7b25257ae9a8a4760c68f5314dcbc0d9b91 /lib/libc/socket | |
| parent | 119aed5bc787ccbf23d2f151759ec1f3a80977e1 (diff) | |
Fix include paths and formatting inconsistencies
Diffstat (limited to 'lib/libc/socket')
| -rw-r--r-- | lib/libc/socket/accept.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/accept4.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/bind.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/connect.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/getpeername.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/getsockname.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/getsockopt.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/listen.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/recv.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/recvfrom.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/recvmsg.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/send.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/sendmsg.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/sendto.c | 7 | ||||
| -rw-r--r-- | lib/libc/socket/setsockopt.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/shutdown.c | 4 | ||||
| -rw-r--r-- | lib/libc/socket/sockatmark.c | 6 | ||||
| -rw-r--r-- | lib/libc/socket/socket.c | 4 | ||||
| -rw-r--r-- | lib/libc/socket/socketpair.c | 4 |
19 files changed, 79 insertions, 35 deletions
diff --git a/lib/libc/socket/accept.c b/lib/libc/socket/accept.c index 61c469c8..f3ec738d 100644 --- a/lib/libc/socket/accept.c +++ b/lib/libc/socket/accept.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_accept + +#include <sys/socket.h> // for accept, socklen_t +#include <syscall.h> // for __syscall_3, syscall int accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) diff --git a/lib/libc/socket/accept4.c b/lib/libc/socket/accept4.c index 8171098b..88c761f5 100644 --- a/lib/libc/socket/accept4.c +++ b/lib/libc/socket/accept4.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_accept4 + +#include <sys/socket.h> // for accept4, socklen_t +#include <syscall.h> // for __syscall_4, syscall int accept4(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len, int flag) diff --git a/lib/libc/socket/bind.c b/lib/libc/socket/bind.c index 111ac321..ef39d03b 100644 --- a/lib/libc/socket/bind.c +++ b/lib/libc/socket/bind.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_bind + +#include <sys/socket.h> // for bind, socklen_t +#include <syscall.h> // for __syscall_3, syscall int bind(int socket, const struct sockaddr *address, socklen_t address_len) { diff --git a/lib/libc/socket/connect.c b/lib/libc/socket/connect.c index fc4502cb..19c9ef95 100644 --- a/lib/libc/socket/connect.c +++ b/lib/libc/socket/connect.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_connect + +#include <sys/socket.h> // for connect, socklen_t +#include <syscall.h> // for __syscall_3, syscall int connect(int socket, const struct sockaddr *address, socklen_t address_len) { diff --git a/lib/libc/socket/getpeername.c b/lib/libc/socket/getpeername.c index 4b694220..f1bc35e8 100644 --- a/lib/libc/socket/getpeername.c +++ b/lib/libc/socket/getpeername.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_getpeername + +#include <sys/socket.h> // for getpeername, socklen_t +#include <syscall.h> // for __syscall_3, syscall int getpeername(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) diff --git a/lib/libc/socket/getsockname.c b/lib/libc/socket/getsockname.c index d8b356fb..b8422261 100644 --- a/lib/libc/socket/getsockname.c +++ b/lib/libc/socket/getsockname.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_getsockname + +#include <sys/socket.h> // for getsockname, socklen_t +#include <syscall.h> // for __syscall_3, syscall int getsockname(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) diff --git a/lib/libc/socket/getsockopt.c b/lib/libc/socket/getsockopt.c index 2ab56774..0c9db0ad 100644 --- a/lib/libc/socket/getsockopt.c +++ b/lib/libc/socket/getsockopt.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_getsockopt + +#include <sys/socket.h> // for getsockopt, socklen_t +#include <syscall.h> // for __syscall_5, syscall int getsockopt(int socket, int level, int option_name, void *restrict option_value, socklen_t *restrict option_len) diff --git a/lib/libc/socket/listen.c b/lib/libc/socket/listen.c index 2866fe27..a204ba28 100644 --- a/lib/libc/socket/listen.c +++ b/lib/libc/socket/listen.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_listen + +#include <sys/socket.h> // for listen +#include <syscall.h> // for __syscall_2, syscall int listen(int socket, int backlog) { diff --git a/lib/libc/socket/recv.c b/lib/libc/socket/recv.c index 87bec811..884b753f 100644 --- a/lib/libc/socket/recv.c +++ b/lib/libc/socket/recv.c @@ -1,5 +1,8 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_recvfrom + +#include <sys/socket.h> // for recv +#include <sys/types.h> // for size_t, ssize_t +#include <syscall.h> // for __syscall_6, syscall ssize_t recv(int socket, void *buffer, size_t length, int flags) { diff --git a/lib/libc/socket/recvfrom.c b/lib/libc/socket/recvfrom.c index a3faa0bb..d37089d9 100644 --- a/lib/libc/socket/recvfrom.c +++ b/lib/libc/socket/recvfrom.c @@ -1,5 +1,8 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_recvfrom + +#include <sys/socket.h> // for recvfrom, socklen_t +#include <sys/types.h> // for size_t, ssize_t +#include <syscall.h> // for __syscall_6, syscall ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags, struct sockaddr *restrict address, diff --git a/lib/libc/socket/recvmsg.c b/lib/libc/socket/recvmsg.c index 29183f35..1b2cfdf1 100644 --- a/lib/libc/socket/recvmsg.c +++ b/lib/libc/socket/recvmsg.c @@ -1,5 +1,8 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_recvmsg + +#include <sys/socket.h> // for recvmsg +#include <sys/types.h> // for ssize_t +#include <syscall.h> // for __syscall_3, syscall ssize_t recvmsg(int socket, struct msghdr *message, int flags) { diff --git a/lib/libc/socket/send.c b/lib/libc/socket/send.c index a2760a2f..7ba42525 100644 --- a/lib/libc/socket/send.c +++ b/lib/libc/socket/send.c @@ -1,5 +1,8 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_sendto + +#include <sys/socket.h> // for send +#include <sys/types.h> // for size_t, ssize_t +#include <syscall.h> // for __syscall_6, syscall ssize_t send(int socket, const void *buffer, size_t length, int flags) { diff --git a/lib/libc/socket/sendmsg.c b/lib/libc/socket/sendmsg.c index 6414021c..b977f7da 100644 --- a/lib/libc/socket/sendmsg.c +++ b/lib/libc/socket/sendmsg.c @@ -1,5 +1,8 @@ -#include <syscall.h> -#include <sys/socket.h> +#include "asm/unistd_64.h" // for __NR_sendmsg + +#include <sys/socket.h> // for sendmsg +#include <sys/types.h> // for ssize_t +#include <syscall.h> // for __syscall_3, syscall ssize_t sendmsg(int socket, const struct msghdr *message, int flags) { diff --git a/lib/libc/socket/sendto.c b/lib/libc/socket/sendto.c index f9628f50..97376037 100644 --- a/lib/libc/socket/sendto.c +++ b/lib/libc/socket/sendto.c @@ -1,5 +1,8 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_sendto + +#include <sys/socket.h> // for sendto, socklen_t +#include <sys/types.h> // for size_t, ssize_t +#include <syscall.h> // for __syscall_6, syscall ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len) diff --git a/lib/libc/socket/setsockopt.c b/lib/libc/socket/setsockopt.c index 8f25bab4..740b2d08 100644 --- a/lib/libc/socket/setsockopt.c +++ b/lib/libc/socket/setsockopt.c @@ -1,5 +1,7 @@ -#include <sys/socket.h> -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_setsockopt + +#include <sys/socket.h> // for setsockopt, socklen_t +#include <syscall.h> // for __syscall_5, syscall int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len) diff --git a/lib/libc/socket/shutdown.c b/lib/libc/socket/shutdown.c index 96c8053c..7fcae79b 100644 --- a/lib/libc/socket/shutdown.c +++ b/lib/libc/socket/shutdown.c @@ -1,4 +1,6 @@ -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_shutdown + +#include <syscall.h> // for __syscall_2, syscall int shutdown(int socket, int how) { diff --git a/lib/libc/socket/sockatmark.c b/lib/libc/socket/sockatmark.c index f7178aa0..4ae64d95 100644 --- a/lib/libc/socket/sockatmark.c +++ b/lib/libc/socket/sockatmark.c @@ -1,5 +1,7 @@ -#include <syscall.h> -#include <asm-generic/sockios.h> +#include "asm/unistd_64.h" // for __NR_ioctl + +#include <asm-generic/sockios.h> // for SIOCATMARK +#include <syscall.h> // for __syscall_3, syscall int sockatmark(int s) { diff --git a/lib/libc/socket/socket.c b/lib/libc/socket/socket.c index 34b5d67b..09847ff9 100644 --- a/lib/libc/socket/socket.c +++ b/lib/libc/socket/socket.c @@ -1,4 +1,6 @@ -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_socket + +#include <syscall.h> // for __syscall_3, syscall int socket(int domain, int type, int protocol) { diff --git a/lib/libc/socket/socketpair.c b/lib/libc/socket/socketpair.c index 6e78b30b..e116c645 100644 --- a/lib/libc/socket/socketpair.c +++ b/lib/libc/socket/socketpair.c @@ -1,4 +1,6 @@ -#include <syscall.h> +#include "asm/unistd_64.h" // for __NR_socketpair + +#include <syscall.h> // for __syscall_4, syscall int socketpair(int domain, int type, int protocol, int socket_vector[2]) { |
