From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TfokY-0007I3-1l for ptxdist@pengutronix.de; Tue, 04 Dec 2012 10:25:10 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1TfokY-0005zU-1T for ptxdist@pengutronix.de; Tue, 04 Dec 2012 10:25:10 +0100 Date: Tue, 4 Dec 2012 10:25:10 +0100 From: Michael Olbrich Message-ID: <20121204092510.GP27118@pengutronix.de> References: <50A3CD61.20505@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50A3CD61.20505@gmail.com> Subject: Re: [ptxdist] [OSELAS.Toolchain] glibc-ports accept4 on ARM for kernels 2.6.36 and later Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi, On Wed, Nov 14, 2012 at 10:57:05AM -0600, George McCollister wrote: > When trying to run systemd on my arm platform I received this error: > "systemd-journald[190]: Failed to accept stdout connection: Function > not implemented" > > I was using OSELAS.Toolchain-2011.03.0. I switched to the newest and > added this patch at the same time: > http://sourceware.org/ml/libc-ports/2012-05/msg00092.html > > Can't say for sure if the patch was required since I didn't try a > build with the new toolchain without the patch. I did look through > glibc-2.14.1 and > glibc-ports-2.14.1 and I didn't see anywhere else where > __ASSUME_ACCEPT4 would be defined for ARM. I've looked at this some more. It is not necessary and des not make any difference. Take a closer look: [...] +/* Support for the accept4 syscall was added in 2.6.36. */ +#if __LINUX_KERNEL_VERSION >= 0x020624 +# define __ASSUME_ACCEPT41 +#endif [...] "__LINUX_KERNEL_VERSION >= 0x020624" mean the _buildtime_ _minimum_ kernel version is >= 2.6.36. And in OSELAS.Toolchain-2011.11.x this is set to 2.6.23. As a result glibc won't just use accept4() but uses a wrapper that checks for its existence the first time it is called. If it gets a ENOSYS, then the emulation code is used. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de