From patchwork Fri Dec 16 04:52:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 706332 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tfybs6X7Dz9t25 for ; Fri, 16 Dec 2016 15:52:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C8C62865D9; Fri, 16 Dec 2016 04:52:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wFIUfeogeibJ; Fri, 16 Dec 2016 04:52:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E11628659E; Fri, 16 Dec 2016 04:52:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AD5E91C003A for ; Fri, 16 Dec 2016 04:52:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AE043833AB for ; Fri, 16 Dec 2016 04:52:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1D3HG0r9oASa for ; Fri, 16 Dec 2016 04:52:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 84EA6831BE for ; Fri, 16 Dec 2016 04:52:32 +0000 (UTC) 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 6AF10440538; Fri, 16 Dec 2016 06:52:28 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Fri, 16 Dec 2016 06:52:17 +0200 Message-Id: <17c4ddc5aab7fdf5461d265a1602a13f6f291708.1481863937.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.10.2 Cc: Rich Felker Subject: [Buildroot] [PATCH] musl: workaround kernel if_ether.h header conflict X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a patch that defines _LINUX_IF_ETHER_H in netinet/if_ether.h to avoid the conflicting kernel if_ether.h. Other musl distros (Alpine, Sabotage, Gentoo) patch[1] the kernel headers instead. This is not practical in Buildroot, since we allow the user to choose the kernel version. This only fixes the normal case of including linux/if_ether.h (directly or indirectly) after netinet/if_ether.h. Fixes (tcpreplay): http://autobuild.buildroot.net/results/a65/a65b27f9e288f94f041ced64313dbf55af47bf36/ [1] https://cgit.gentoo.org/proj/musl.git/diff/sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch?id=8eddda8072add075ebf56cf6d288bc1450d6b5f8 Cc: Rich Felker Signed-off-by: Baruch Siach --- This patch will take effect in the autobuilder after a rebuild of musl toolchains. --- package/musl/0002-avoid-kernel-if_ether.h.patch | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/musl/0002-avoid-kernel-if_ether.h.patch diff --git a/package/musl/0002-avoid-kernel-if_ether.h.patch b/package/musl/0002-avoid-kernel-if_ether.h.patch new file mode 100644 index 000000000000..8efbcc845083 --- /dev/null +++ b/package/musl/0002-avoid-kernel-if_ether.h.patch @@ -0,0 +1,30 @@ +From 3984adc4976de7553f51e0cf4de1e18c373b332b Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 15 Dec 2016 15:10:19 +0200 +Subject: [PATCH] Avoid redefinition of struct ethhdr + +This is a workaround to the if_ether.h conflict between musl and the kernel. +Both define struct ethhdr. + +Signed-off-by: Baruch Siach +--- + include/netinet/if_ether.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h +index 11ee65823f93..cfe1949d3371 100644 +--- a/include/netinet/if_ether.h ++++ b/include/netinet/if_ether.h +@@ -1,6 +1,9 @@ + #ifndef _NETINET_IF_ETHER_H + #define _NETINET_IF_ETHER_H + ++/* Suppress kernel if_ether.h header inclusion */ ++#define _LINUX_IF_ETHER_H ++ + #include + #include + +-- +2.10.2 +