Skip to content

Commit fbd47de

Browse files
committed
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
1 parent 09adec1 commit fbd47de

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • tools/include/nolibc

tools/include/nolibc/sys.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,8 @@ pid_t sys_fork(void)
334334
* will not use the rest with no other flag.
335335
*/
336336
return my_syscall5(__NR_clone, SIGCHLD, 0, 0, 0, 0);
337-
#elif defined(__NR_fork)
338-
return my_syscall0(__NR_fork);
339337
#else
340-
return __nolibc_enosys(__func__);
338+
return my_syscall0(__NR_fork);
341339
#endif
342340
}
343341
#endif
@@ -354,7 +352,7 @@ pid_t sys_vfork(void)
354352
{
355353
#if defined(__NR_vfork)
356354
return my_syscall0(__NR_vfork);
357-
#elif defined(__NR_clone3)
355+
#else
358356
/*
359357
* clone() could be used but has different argument orders per
360358
* architecture.
@@ -365,8 +363,6 @@ pid_t sys_vfork(void)
365363
};
366364

367365
return my_syscall2(__NR_clone3, &args, sizeof(args));
368-
#else
369-
return __nolibc_enosys(__func__);
370366
#endif
371367
}
372368
#endif

0 commit comments

Comments
 (0)