This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix build of accept4.c on non-Linux
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Aurelien Jarno <aurelien at aurel32 dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 16 Feb 2012 11:26:13 -0500
- Subject: Re: [PATCH] Fix build of accept4.c on non-Linux
- References: <20120216103348.GA798@hall.aurel32.net>
On Thu, Feb 16, 2012 at 5:33 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Non-Linux architectures are using socket/accept4.c instead of the Linux
> specific version, and this version fails to build with:
>
> ? ?accept4.c:38: error: '__EI_accept4' aliased to undefined symbol '__GI_accept4'
>
>
> 2012-02-16 ?Aurelien Jarno ?<aurelien@aurel32.net>
>
> ? ? ? ?[BZ #10191]
> ? ? ? ?* socket/accept4.c (accept4): Remove libc_hidden_def.
>
> diff --git a/socket/accept4.c b/socket/accept4.c
> index 7c7e2dd..29cc0a0 100644
> --- a/socket/accept4.c
> +++ b/socket/accept4.c
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2008 Free Software Foundation, Inc.
> +/* Copyright (C) 2008, 2012 Free Software Foundation, Inc.
> ? ?This file is part of the GNU C Library.
>
> ? ?The GNU C Library is free software; you can redistribute it and/or
> @@ -34,8 +34,6 @@ accept4 (fd, addr, addr_len, flags)
> ? __set_errno (ENOSYS);
> ? return -1;
> ?}
> -libc_hidden_def (accept4)
> -
>
> ?stub_warning (accept4)
> ?#include <stub-tag.h>
This looks good to me, but could we avoid code duplication by having
Linux accept4.c do an include-next in the final else condition? I
assume that's why we never saw this failure on Linux systems...
because this code is correctly duplicated into the Linux accept4.c
version.
Cheers,
Carlos.