Clang complains about redefined structures when building iptables-1.8.8 on musl. Reproducible: Always Steps to Reproduce: Build iptables-1.8.8 or iptables-1.8.8-r1 with clang on a musl system. Actual Results: In file included from xtables.c:2248: In file included from /usr/include/netinet/ether.h:8: /usr/include/netinet/if_ether.h:115:8: error: redefinition of 'ethhdr' struct ethhdr { ^ /usr/include/linux/if_ether.h:169:8: note: previous definition is here struct ethhdr { ^ 1 warning and 1 error generated.
Please include the full build.log and emerge --info.
Created attachment 779456 [details] emerge --info output
Created attachment 779459 [details] build.log
Created attachment 779462 [details, diff] possible fix Moving this include so it's at the top (before linux/if_ether.h) fixes the build failure. Signed-off-by: Carlos Eduardo (carana2099@gmail.com)
*** Bug 846545 has been marked as a duplicate of this bug. ***
tinderbox_musl has reproduced this issue with version 1.8.8-r2 - Updating summary.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56a695955754b0947cc12f99da838eab57f939de commit 56a695955754b0947cc12f99da838eab57f939de Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-28 02:52:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-28 02:52:21 +0000 net-firewall/iptables: fix musl build Closes: https://bugs.gentoo.org/846377 Signed-off-by: Sam James <sam@gentoo.org> .../files/iptables-1.8.8-musl-headers.patch | 59 ++++++++++++++++++++++ .../files/iptables-1.8.8-out-of-tree-build.patch | 26 ++++++++++ net-firewall/iptables/iptables-1.8.8-r2.ebuild | 2 + 3 files changed, 87 insertions(+)