From patchwork Mon May 16 16:24:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 1631737 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=systemli.org header.i=@systemli.org header.a=rsa-sha256 header.s=default header.b=wGxNPsF8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4L24NB3VsFz9s2R for ; Tue, 17 May 2022 02:24:58 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234429AbiEPQY4 (ORCPT ); Mon, 16 May 2022 12:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233696AbiEPQYz (ORCPT ); Mon, 16 May 2022 12:24:55 -0400 Received: from mail1.systemli.org (mail1.systemli.org [IPv6:2a11:7980:3::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B2128E3A for ; Mon, 16 May 2022 09:24:54 -0700 (PDT) From: vincent@systemli.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemli.org; s=default; t=1652718293; bh=wh1hIvnzVfhCVkufTjnnISPaL9qOhTZ36NOtwoZkII4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wGxNPsF87o7lqYT3UM0KUub7zguvRORpoBKRTJPrqfW9d1QsXYD+H1V3AhxNpHF9U RGzmpT4NRHJAMC4EaZlJGs+sQ+RNXkD/TD0CnidKT79MDN60tCI+3kATS086ReaSS7 oe0dLd97P3PZx6hBsCfzJh50gKueztm3TGdc/ED0W16Qrr6/qNGWZELSpQ+WTfonmu BssYt/IPm+0MoEVQyzp2eGqAUvDdw7oo9UkWlxICH0PRp/RlSrEv0PYnIWuwpEgDZd lEiHGprlJ+qaKqEcm7h2YvXFjiBHyI6zi5eZi+RDWO5xZH80OtGc53KSaJ6NSg/qGa leyq76GT0FGVQ== To: netfilter-devel@vger.kernel.org Cc: Nick Hainke Subject: [PATCH] xtables: fix compilation with musl Date: Mon, 16 May 2022 18:24:48 +0200 Message-Id: <20220516162448.24800-1-vincent@systemli.org> In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Nick Hainke Only include if bionic is used. Fixes errors in the form of: In file included from /home/nick/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include/netinet/ether.h:8, from xtables.c:2238: /home/nick/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include/netinet/if_ether.h:115:8: error: redefinition of 'struct ethhdr' 115 | struct ethhdr { | ^~~~~~ In file included from xtables.c:48: /home/nick/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-5.15.38/user_headers/include/linux/if_ether.h:168:8: note: originally defined here 168 | struct ethhdr { | ^~~~~~ make[5]: *** [Makefile:471: libxtables_la-xtables.lo] Error 1 Signed-off-by: Nick Hainke --- libxtables/xtables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 96fd783a..7dd7729d 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -45,7 +45,9 @@ #include #include /* INT_MAX in ip_tables.h/ip6_tables.h */ +#ifdef __BIONIC__ #include /* ETH_ALEN */ +#endif #include #include #include