]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
tools/nolibc: remove __nolibc_enosys() fallback from fork functions
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 21 Aug 2025 15:40:35 +0000 (17:40 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 1 Sep 2025 18:47:54 +0000 (20:47 +0200)
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
tools/include/nolibc/sys.h

index 32cc741f2f7d70cb963b8686348db2da9b1f2932..34f20182792a059e2ecce3579261bef512298dc9 100644 (file)
@@ -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