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/stat/chmod.c | 7 +++++-- lib/libc/stat/fchmod.c | 7 +++++-- lib/libc/stat/fchmodat.c | 7 +++++-- lib/libc/stat/fstat.c | 4 +--- lib/libc/stat/fstatat.c | 12 ++++++++---- lib/libc/stat/futimens.c | 4 +++- lib/libc/stat/lstat.c | 4 ++-- lib/libc/stat/mkdir.c | 8 +++++--- lib/libc/stat/mkdirat.c | 8 +++++--- lib/libc/stat/mkfifo.c | 3 ++- lib/libc/stat/mkfifoat.c | 3 ++- lib/libc/stat/mknod.c | 9 ++++++--- lib/libc/stat/mknodat.c | 7 +++++-- lib/libc/stat/stat.c | 4 ++-- lib/libc/stat/umask.c | 7 +++++-- lib/libc/stat/utimensat.c | 6 ++++-- 16 files changed, 65 insertions(+), 35 deletions(-) (limited to 'lib/libc/stat') diff --git a/lib/libc/stat/chmod.c b/lib/libc/stat/chmod.c index 6b7283e2..f204df83 100644 --- a/lib/libc/stat/chmod.c +++ b/lib/libc/stat/chmod.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_chmod + +#include // for chmod +#include // for mode_t +#include // for __syscall_2, syscall int chmod(const char *path, mode_t mode) { diff --git a/lib/libc/stat/fchmod.c b/lib/libc/stat/fchmod.c index 22593fd6..c7b0b0f3 100644 --- a/lib/libc/stat/fchmod.c +++ b/lib/libc/stat/fchmod.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_fchmod + +#include // for fchmod +#include // for mode_t +#include // for __syscall_2, syscall int fchmod(int fildes, mode_t mode) { diff --git a/lib/libc/stat/fchmodat.c b/lib/libc/stat/fchmodat.c index 71a3c0c5..30c8230c 100644 --- a/lib/libc/stat/fchmodat.c +++ b/lib/libc/stat/fchmodat.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_fchmodat2 + +#include // for fchmodat +#include // for mode_t +#include // for __syscall_4, syscall int fchmodat(int fd, const char *path, mode_t mode, int flag) { diff --git a/lib/libc/stat/fstat.c b/lib/libc/stat/fstat.c index 7a9fb4e4..9c3a9df2 100644 --- a/lib/libc/stat/fstat.c +++ b/lib/libc/stat/fstat.c @@ -1,6 +1,4 @@ -#include -#include -#include +#include // for fstatat, fstat int fstat(int fildes, struct stat *buf) { diff --git a/lib/libc/stat/fstatat.c b/lib/libc/stat/fstatat.c index d7aecbc5..c36ba3e3 100644 --- a/lib/libc/stat/fstatat.c +++ b/lib/libc/stat/fstatat.c @@ -1,8 +1,12 @@ -#include +#include // for statx, statx_timestamp, STATX_BASIC_STATS +#include // for timespec + #define __BITS_STAT_H_ -#include -#undef __BITS_STAT_H_ -#include + +#include "asm/unistd_64.h" // for __NR_statx + +#include // for stat +#include // for __syscall_5, syscall #define makedev(major, minor) \ ((((major) & 0xfffff000ULL) << 32) | \ diff --git a/lib/libc/stat/futimens.c b/lib/libc/stat/futimens.c index 38c6876f..f3bb425d 100644 --- a/lib/libc/stat/futimens.c +++ b/lib/libc/stat/futimens.c @@ -1,4 +1,6 @@ -#include +#define __BITS_STAT_H_ +#include // for timespec +#include // for utimensat, futimens int futimens(int fd, const struct timespec times[2]) { diff --git a/lib/libc/stat/lstat.c b/lib/libc/stat/lstat.c index a188f78d..77ded510 100644 --- a/lib/libc/stat/lstat.c +++ b/lib/libc/stat/lstat.c @@ -1,5 +1,5 @@ -#include -#include +#include // for AT_FDCWD, AT_SYMLINK_NOFOLLOW +#include // for fstatat, lstat int lstat(const char *restrict path, struct stat *restrict buf) { diff --git a/lib/libc/stat/mkdir.c b/lib/libc/stat/mkdir.c index 1f97fb3f..58de4a89 100644 --- a/lib/libc/stat/mkdir.c +++ b/lib/libc/stat/mkdir.c @@ -1,6 +1,8 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_mkdir + +#include // for mkdir +#include // for mode_t +#include // for __syscall_2, syscall int mkdir(const char *path, mode_t mode) { diff --git a/lib/libc/stat/mkdirat.c b/lib/libc/stat/mkdirat.c index d129008b..49a4cecf 100644 --- a/lib/libc/stat/mkdirat.c +++ b/lib/libc/stat/mkdirat.c @@ -1,6 +1,8 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_mkdirat + +#include // for mkdirat +#include // for mode_t +#include // for __syscall_3, syscall int mkdirat(int fd, const char *path, mode_t mode) { diff --git a/lib/libc/stat/mkfifo.c b/lib/libc/stat/mkfifo.c index 60efcf73..6c64fe35 100644 --- a/lib/libc/stat/mkfifo.c +++ b/lib/libc/stat/mkfifo.c @@ -1,4 +1,5 @@ -#include +#include // for mknod, S_IFIFO, mkfifo +#include // for mode_t int mkfifo(const char *path, mode_t mode) { diff --git a/lib/libc/stat/mkfifoat.c b/lib/libc/stat/mkfifoat.c index d3a1f970..d4023c63 100644 --- a/lib/libc/stat/mkfifoat.c +++ b/lib/libc/stat/mkfifoat.c @@ -1,4 +1,5 @@ -#include +#include // for mknodat, S_IFIFO, mkfifoat +#include // for mode_t int mkfifoat(int fd, const char *path, mode_t mode) { diff --git a/lib/libc/stat/mknod.c b/lib/libc/stat/mknod.c index 1a4a5c6c..b8efed01 100644 --- a/lib/libc/stat/mknod.c +++ b/lib/libc/stat/mknod.c @@ -1,6 +1,9 @@ -#include -#include -#include +#include "asm/unistd_64.h" // for __NR_mknodat + +#include // for AT_FDCWD +#include // for mknod +#include // for dev_t, mode_t +#include // for __syscall_4, syscall int mknod(const char *path, mode_t mode, dev_t dev) { diff --git a/lib/libc/stat/mknodat.c b/lib/libc/stat/mknodat.c index 9967248e..5ac50f5c 100644 --- a/lib/libc/stat/mknodat.c +++ b/lib/libc/stat/mknodat.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_mknodat + +#include // for mknodat +#include // for dev_t, mode_t +#include // for __syscall_4, syscall int mknodat(int fd, const char *path, mode_t mode, dev_t dev) { diff --git a/lib/libc/stat/stat.c b/lib/libc/stat/stat.c index 95bdf73d..d839f0eb 100644 --- a/lib/libc/stat/stat.c +++ b/lib/libc/stat/stat.c @@ -1,5 +1,5 @@ -#include -#include +#include // for AT_FDCWD +#include // for fstatat, stat int stat(const char *restrict path, struct stat *restrict buf) { diff --git a/lib/libc/stat/umask.c b/lib/libc/stat/umask.c index 2724317a..f9026df8 100644 --- a/lib/libc/stat/umask.c +++ b/lib/libc/stat/umask.c @@ -1,5 +1,8 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_umask + +#include // for umask +#include // for mode_t +#include // for __syscall_1, syscall mode_t umask(mode_t cmask) { diff --git a/lib/libc/stat/utimensat.c b/lib/libc/stat/utimensat.c index d51611a3..5193a819 100644 --- a/lib/libc/stat/utimensat.c +++ b/lib/libc/stat/utimensat.c @@ -1,5 +1,7 @@ -#include -#include +#include "asm/unistd_64.h" // for __NR_utimensat + +#include // for __syscall_4, syscall +#include // for timespec int utimensat(int fd, const char *path, const struct timespec times[2], int flag) -- cgit v1.2.3