From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753078AbcEIVfw (ORCPT ); Mon, 9 May 2016 17:35:52 -0400 Received: from mail.us.es ([193.147.175.20]:35137 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbcEIVfu (ORCPT ); Mon, 9 May 2016 17:35:50 -0400 Date: Mon, 9 May 2016 23:35:35 +0200 From: Pablo Neira Ayuso To: Josh Boyer Cc: Mikko Rapeli , "David S. Miller" , Zhang Shengju , Stephen Hemminger , "Linux-Kernel@Vger. Kernel. Org" , Jan Engelhardt , Waldemar Brodkorb , Gabriel Laskar , netfilter-devel@vger.kernel.org, libc-alpha Subject: Re: [PATCH v2] uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h Message-ID: <20160509213535.GA23623@salvia> References: <1461512707-23058-1-git-send-email-mikko.rapeli@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2016 at 09:59:22AM -0400, Josh Boyer wrote: > On Sun, Apr 24, 2016 at 11:45 AM, Mikko Rapeli wrote: > > glibc's net/if.h contains copies of definitions from linux/if.h and these > > conflict and cause build failures if both files are included by application > > source code. Changes in uapi headers, which fixed header file dependencies to > > include linux/if.h when it was needed, e.g. commit 1ffad83d, made the > > net/if.h and linux/if.h incompatibilities visible as build failures for > > userspace applications like iproute2 and xtables-addons. > > > > This patch fixes compile errors when glibc net/if.h is included before > > linux/if.h: > > > > ./linux/if.h:99:21: error: redeclaration of enumerator ‘IFF_NOARP’ [...] > > > > The cases where linux/if.h is included before net/if.h need a similar fix in > > the glibc side, or the order of include files can be changed userspace > > code as a workaround. > > > > This change was tested in x86 userspace on Debian unstable with > > scripts/headers_compile_test.sh: > > > > $ make headers_install && \ > > cd usr/include && ../../scripts/headers_compile_test.sh -l -k > > ... > > cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i586-linux-gnu/5/include-fixed -I . -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH -I /home/mcfrisk/src/linux-2.6/usr/headers_compile_test_include.2uX2zH/i586-linux-gnu -o /dev/null ./linux/if.h_libc_before_kernel.h > > PASSED libc before kernel test: ./linux/if.h > > > > Reported-by: Jan Engelhardt > > Reported-by: Josh Boyer > > Reported-by: Stephen Hemminger > > Reported-by: Waldemar Brodkorb > > Cc: Gabriel Laskar > > Signed-off-by: Mikko Rapeli > > Bump. Did this get lost in a queue somewhere? It seems linux-netdev was not Cc'ed. I cannot find this in David's patchwork [1]. @Mikko: Could you resubmit including netdev@vger.kernel.org? Thanks. [1] http://patchwork.ozlabs.org/project/netdev/list/.