summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2025-08-21 17:40:35 +0200
committerThomas Weißschuh <linux@weissschuh.net>2025-09-01 20:47:54 +0200
commitfbd47de75502c63933016912325582309d72cd03 (patch)
treeb98e28b5bb2821ac44b6560a5f22bd7c5d316158
parent09adec1f4b446e8788c70022fae41356ee916260 (diff)
tools/nolibc: remove __nolibc_enosys() fallback from fork functions
All architectures have one of the real functions available. The additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-4-4b63f2caaa89@weissschuh.net
-rw-r--r--tools/include/nolibc/sys.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 32cc741f2f7d..34f20182792a 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -334,10 +334,8 @@ pid_t sys_fork(void)
* will not use the rest with no other flag.
*/
return my_syscall5(__NR_clone, SIGCHLD, 0, 0, 0, 0);
-#elif defined(__NR_fork)
- return my_syscall0(__NR_fork);
#else
- return __nolibc_enosys(__func__);
+ return my_syscall0(__NR_fork);
#endif
}
#endif
@@ -354,7 +352,7 @@ pid_t sys_vfork(void)
{
#if defined(__NR_vfork)
return my_syscall0(__NR_vfork);
-#elif defined(__NR_clone3)
+#else
/*
* clone() could be used but has different argument orders per
* architecture.
@@ -365,8 +363,6 @@ pid_t sys_vfork(void)
};
return my_syscall2(__NR_clone3, &args, sizeof(args));
-#else
- return __nolibc_enosys(__func__);
#endif
}
#endif