Skip to content

Commit 09adec1

Browse files
committed
tools/nolibc: remove __nolibc_enosys() fallback from dup2()
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-3-4b63f2caaa89@weissschuh.net
1 parent 4b6ffb2 commit 09adec1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • tools/include/nolibc

tools/include/nolibc/sys.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,8 @@ int sys_dup2(int old, int new)
248248
}
249249

250250
return my_syscall3(__NR_dup3, old, new, 0);
251-
#elif defined(__NR_dup2)
252-
return my_syscall2(__NR_dup2, old, new);
253251
#else
254-
return __nolibc_enosys(__func__, old, new);
252+
return my_syscall2(__NR_dup2, old, new);
255253
#endif
256254
}
257255

0 commit comments

Comments
 (0)