Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 6329/1: wire up sys_accept4() on ARM

sys_accept4() was added in kernel 2.6.28, but ARM was not updated
to include it. The number and types of parameters is such that
no ARM-specific processing is needed, so wiring up sys_accept4()
just requires defining __NR_accept4 and adding a direct call in
the syscall entry table.

Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
accept4() test program, modified to define __NR_accept4 for ARM.

Using the updated unistd.h also eliminates a warning then building
glibc (2.10.2 and newer) about accept4() being unimplemented.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Mikael Pettersson and committed by
Russell King
21d93e2e bd365591

+2
+1
arch/arm/include/asm/unistd.h
··· 392 392 #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) 393 393 #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) 394 394 #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) 395 + #define __NR_accept4 (__NR_SYSCALL_BASE+366) 395 396 396 397 /* 397 398 * The following SWIs are ARM private.
+1
arch/arm/kernel/calls.S
··· 375 375 CALL(sys_rt_tgsigqueueinfo) 376 376 CALL(sys_perf_event_open) 377 377 /* 365 */ CALL(sys_recvmmsg) 378 + CALL(sys_accept4) 378 379 #ifndef syscalls_counted 379 380 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 380 381 #define syscalls_counted