From 8929eb838bec8d3f5eb0d5a1c6b91a4f27d0baff Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 17 Jun 2023 18:42:52 +0200 Subject: libc: dumb stat() stubs to make dash's PATH search work --- src/user/lib/include/sys/stat.h | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/user/lib/include/sys/stat.h') diff --git a/src/user/lib/include/sys/stat.h b/src/user/lib/include/sys/stat.h index 26c8323..343db55 100644 --- a/src/user/lib/include/sys/stat.h +++ b/src/user/lib/include/sys/stat.h @@ -47,24 +47,9 @@ struct stat { #define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) #define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK) -static inline int fstat(int fd, struct stat *sb) { - (void)fd; (void)sb; - errno = ENOSYS; - return -1; -} - -static inline int stat(const char *restrict path, struct stat *restrict sb) { - (void)path; (void)sb; - errno = ENOSYS; - return -1; -} - -static inline int lstat(const char *restrict path, struct stat *restrict sb) { - (void)path; (void)sb; - errno = ENOSYS; - return -1; -} - +int fstat(int fd, struct stat *sb); +int stat(const char *restrict path, struct stat *restrict sb); +int lstat(const char *restrict path, struct stat *restrict sb); int mkdir(const char *path, mode_t mode); static inline mode_t umask(mode_t mask) { -- cgit v1.2.3