From b5cd18739a64c8d923a55b61c89ae3900faafd84 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 21:17:12 +0100 Subject: Fix include paths and formatting inconsistencies --- lib/libc/fcntl/creat.c | 7 +++++-- lib/libc/fcntl/fcntl.c | 9 ++++++--- lib/libc/fcntl/open.c | 9 ++++++--- lib/libc/fcntl/openat.c | 9 ++++++--- lib/libc/fcntl/posix_fadvise.c | 7 +++++-- lib/libc/fcntl/posix_fallocate.c | 7 +++++-- 6 files changed, 33 insertions(+), 15 deletions(-) (limited to 'lib/libc/fcntl') diff --git a/lib/libc/fcntl/creat.c b/lib/libc/fcntl/creat.c index fdcb6655..43110794 100644 --- a/lib/libc/fcntl/creat.c +++ b/lib/libc/fcntl/creat.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_creat + +#include // for creat +#include // for mode_t +#include // for __syscall_2, syscall int creat(const char *path, mode_t mode) { diff --git a/lib/libc/fcntl/fcntl.c b/lib/libc/fcntl/fcntl.c index ae213df5..6112567d 100644 --- a/lib/libc/fcntl/fcntl.c +++ b/lib/libc/fcntl/fcntl.c @@ -1,6 +1,9 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_fcntl, __NR_close +#include "errno.h" // for EINVAL + +#include // for F_DUPFD_CLOEXEC, FD_CLOEXEC, F_SETFD, F_D... +#include // for va_arg, va_end, va_list, va_start +#include // for __syscall_ret, syscall, __syscall_3, __sy... int fcntl(int fildes, int cmd, ...) { diff --git a/lib/libc/fcntl/open.c b/lib/libc/fcntl/open.c index dbdff8f9..c00820c1 100644 --- a/lib/libc/fcntl/open.c +++ b/lib/libc/fcntl/open.c @@ -1,6 +1,9 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_fcntl, __NR_open + +#include // for FD_CLOEXEC, F_SETFD, O_CLOEXEC, O_CREAT +#include // for va_arg, va_end, va_list, va_start +#include // for mode_t +#include // for __syscall_3, syscall int open(const char *path, int oflag, ...) { diff --git a/lib/libc/fcntl/openat.c b/lib/libc/fcntl/openat.c index bb34d600..d3475f6b 100644 --- a/lib/libc/fcntl/openat.c +++ b/lib/libc/fcntl/openat.c @@ -1,6 +1,9 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_openat + +#include // for O_CREAT, openat +#include // for va_arg, va_end, va_list, va_start +#include // for mode_t +#include // for __syscall_4, syscall int openat(int fd, const char *path, int oflag, ...) { diff --git a/lib/libc/fcntl/posix_fadvise.c b/lib/libc/fcntl/posix_fadvise.c index dcf278fd..08718294 100644 --- a/lib/libc/fcntl/posix_fadvise.c +++ b/lib/libc/fcntl/posix_fadvise.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_fadvise64 + +#include // for posix_fadvise +#include // for off_t +#include // for __syscall_4, syscall int posix_fadvise(int fd, off_t offset, off_t len, int advice) { diff --git a/lib/libc/fcntl/posix_fallocate.c b/lib/libc/fcntl/posix_fallocate.c index 221f2d38..61129c4a 100644 --- a/lib/libc/fcntl/posix_fallocate.c +++ b/lib/libc/fcntl/posix_fallocate.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_fallocate + +#include // for posix_fallocate +#include // for off_t +#include // for __syscall_4, syscall int posix_fallocate(int fd, off_t offset, off_t len) { -- cgit v1.2.3