aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/include/nolibc
diff options
context:
space:
mode:
authorLouis Taylor <louis@kragniz.eu>2025-03-06 18:41:19 +0000
committerThomas Weißschuh <linux@weissschuh.net>2025-03-06 22:30:20 +0100
commitfbd4f52f5bf76e6ef63d7ebee16d404c6c8cfebb (patch)
treef270779192da042b5cda6aba00e4dffe885cf688 /tools/include/nolibc
parenttools/nolibc: add support for openat(2) (diff)
downloadwireguard-linux-fbd4f52f5bf76e6ef63d7ebee16d404c6c8cfebb.tar.xz
wireguard-linux-fbd4f52f5bf76e6ef63d7ebee16d404c6c8cfebb.zip
tools/nolibc: always use openat(2) instead of open(2)
All architectures support openat, so we don't need to make its use conditional. Signed-off-by: Louis Taylor <louis@kragniz.eu> Link: https://lore.kernel.org/r/20250306184147.208723-2-louis@kragniz.eu Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/include/nolibc')
-rw-r--r--tools/include/nolibc/sys.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 3cd938f9abda..a8dca5ac6542 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -798,13 +798,7 @@ int openat(int dirfd, const char *path, int flags, ...)
static __attribute__((unused))
int sys_open(const char *path, int flags, mode_t mode)
{
-#ifdef __NR_openat
return my_syscall4(__NR_openat, AT_FDCWD, path, flags, mode);
-#elif defined(__NR_open)
- return my_syscall3(__NR_open, path, flags, mode);
-#else
- return __nolibc_enosys(__func__, path, flags, mode);
-#endif
}
static __attribute__((unused))