Skip to content

Commit

Permalink
ARM: 6329/1: wire up sys_accept4() on ARM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mikael Pettersson authored and Denis Zalevskiy committed Oct 11, 2012
1 parent d3f3f5a commit 3154069
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/include/asm/unistd.h
Expand Up @@ -391,6 +391,7 @@
#define __NR_pwritev (__NR_SYSCALL_BASE+362)
#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
#define __NR_accept4 (__NR_SYSCALL_BASE+366)

/*
* The following SWIs are ARM private.
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/kernel/calls.S
Expand Up @@ -374,6 +374,8 @@
CALL(sys_pwritev)
CALL(sys_rt_tgsigqueueinfo)
CALL(sys_perf_event_open)
/* 365 */ CALL(sys_ni_syscall)
CALL(sys_accept4)
#ifndef syscalls_counted
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
#define syscalls_counted
Expand Down

0 comments on commit 3154069

Please sign in to comment.