From: Otavio Salvador Date: Tue, 12 Jun 2012 14:39:52 +0000 (-0300) Subject: linux-libc-headers-imx (2.6.35.3): add patch to export accept4 syscall X-Git-Tag: 2.1~1776 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=b37d1ebd925b749e564f22ef719ba6f49895eaa5;p=meta-freescale.git linux-libc-headers-imx (2.6.35.3): add patch to export accept4 syscall This patch has been backported from 2.6.36 and needs to be included here, besides the kernel, to properly export the syscall to libc headers. Signed-off-by: Otavio Salvador --- diff --git a/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx-2.6.35.3/wire-up-sys_accept4-on-ARM.patch b/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx-2.6.35.3/wire-up-sys_accept4-on-ARM.patch new file mode 100644 index 00000000..7182e807 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx-2.6.35.3/wire-up-sys_accept4-on-ARM.patch @@ -0,0 +1,53 @@ +From 1415ec63689ef39bcb24b5095941ec4cc884035c Mon Sep 17 00:00:00 2001 +From: Mikael Pettersson +Date: Sun, 15 Aug 2010 10:47:23 +0100 +Subject: [PATCH 1/2] 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. + +Upstream-Status: Backport [2.6.36] + +Signed-off-by: Mikael Pettersson +Signed-off-by: Russell King +--- + arch/arm/include/asm/unistd.h | 1 + + arch/arm/kernel/calls.S | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h +index dd2bf53..d02cfb6 100644 +--- a/arch/arm/include/asm/unistd.h ++++ b/arch/arm/include/asm/unistd.h +@@ -392,6 +392,7 @@ + #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) + #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) + #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) ++#define __NR_accept4 (__NR_SYSCALL_BASE+366) + + /* + * The following SWIs are ARM private. +diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S +index 37ae301..afeb71f 100644 +--- a/arch/arm/kernel/calls.S ++++ b/arch/arm/kernel/calls.S +@@ -375,6 +375,7 @@ + CALL(sys_rt_tgsigqueueinfo) + CALL(sys_perf_event_open) + /* 365 */ CALL(sys_recvmmsg) ++ CALL(sys_accept4) + #ifndef syscalls_counted + .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls + #define syscalls_counted +-- +1.6.6.1 + diff --git a/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx_2.6.35.3.bb b/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx_2.6.35.3.bb index 7b337332..f2274e3c 100644 --- a/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx_2.6.35.3.bb +++ b/meta-fsl-arm/recipes-kernel/linux-libc-headers/linux-libc-headers-imx_2.6.35.3.bb @@ -4,7 +4,8 @@ PROVIDES = "linux-libc-headers" RPROVIDES_${PN}-dev = "linux-libc-headers-dev" RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg" -SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;tag=rel_imx_2.6.35_11.09.01" +SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;tag=rel_imx_2.6.35_11.09.01 \ + file://wire-up-sys_accept4-on-ARM.patch" S = "${WORKDIR}/git" -PR = "r2" +PR = "r3"