From patchwork Fri May 4 09:46:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 908634 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tkos.co.il Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40cnHT6kZ7z9s3G for ; Fri, 4 May 2018 19:47:33 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbeEDJra (ORCPT ); Fri, 4 May 2018 05:47:30 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:59879 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeEDJr3 (ORCPT ); Fri, 4 May 2018 05:47:29 -0400 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 5FD614405D7; Fri, 4 May 2018 12:47:26 +0300 (IDT) From: Baruch Siach To: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org, Baruch Siach Subject: [PATCH ebtables] Fix musl libc compatibility Date: Fri, 4 May 2018 12:46:52 +0300 Message-Id: <8937525032a5846343b9dc6e4bd7d767ee5236eb.1525427212.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Conflicting definitions of struct ethhdr between the kernel and musl libc provides headers causes a build failure: In file included from .../usr/include/netinet/ether.h:8:0, from useful_functions.c:28: .../usr/include/netinet/if_ether.h:107:8: error: redefinition of ‘struct ethhdr’ struct ethhdr { ^~~~~~ In file included from include/linux/netfilter_bridge.h:8:0, from include/linux/netfilter_bridge/ebtables.h:17, from include/ebtables_u.h:27, from useful_functions.c:25: include/linux/if_ether.h:119:8: note: originally defined here struct ethhdr { ^~~~~~ Recent enough versions kernel headers allow the libc to suppress conflicting kernel definitions. Include the libc proivded netinet/ether.h before kernel headers to suppress the conflicting definition of struct ethhdr. Signed-off-by: Baruch Siach --- include/ebtables_u.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/ebtables_u.h b/include/ebtables_u.h index c8589969bd8e..4824a145964e 100644 --- a/include/ebtables_u.h +++ b/include/ebtables_u.h @@ -24,6 +24,7 @@ #ifndef EBTABLES_U_H #define EBTABLES_U_H #include +#include #include #include