fork: generate stub on no-MMU systems
commit170619adce4eb73c175362851118364e143636a2
authorBen Wolsieffer <Ben.Wolsieffer@hefring.com>
Thu, 14 Sep 2023 15:02:42 +0000 (14 11:02 -0400)
committerWaldemar Brodkorb <wbx@openadk.org>
Fri, 15 Sep 2023 05:18:35 +0000 (15 07:18 +0200)
treeccb51e296a88563224cc8037b9f60358cfe9fa2d
parentcf0e633c84ce83a5aaf39529b1c7595a0c46170b
fork: generate stub on no-MMU systems

fork() can be implemented using either the fork or clone syscalls on MMU
systems. Therefore the stub is only generated if neither __NR_fork nor
__NR_clone are defined. The stub code manually undefines __NR_fork on
no-MMU systems in an attempt to enable the stub, but this doesn't work
because __NR_clone is still defined. It is not appropriate to undefine
__NR_clone because clone is available on no-MMU, it is just not capable
of implementing fork.

This patch directly enables the fork stub if __ARCH_USE_MMU__ is not
defined. This eliminates the need to undefine __NR_fork, so this code is
removed

Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
libc/sysdeps/linux/common/stubs.c