From 09adec1f4b446e8788c70022fae41356ee916260 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Thu, 21 Aug 2025 17:40:34 +0200 Subject: [PATCH] tools/nolibc: remove __nolibc_enosys() fallback from dup2() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit All architectures have one of the real functions available. The additional fallback to __nolibc_enosys() is superfluous. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-3-4b63f2caaa89@weissschuh.net --- tools/include/nolibc/sys.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 12030c8031737..32cc741f2f7d7 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -248,10 +248,8 @@ int sys_dup2(int old, int new) } return my_syscall3(__NR_dup3, old, new, 0); -#elif defined(__NR_dup2) - return my_syscall2(__NR_dup2, old, new); #else - return __nolibc_enosys(__func__, old, new); + return my_syscall2(__NR_dup2, old, new); #endif } -- 2.47.3