All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libnetfilter_conntrack: fix musl build with headers >= 5.15
@ 2022-03-13  9:02 Fabrice Fontaine
  2022-03-21 21:17 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-03-13  9:02 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following build failure with musl and headers >= 5.15 raised
since bump to version 1.0.9 in commit
9af9dfa543907c46091c706b0f3a0eb89445ae74:

In file included from /home/buildroot/autobuild/instance-3/output-1/host/arm-buildroot-linux-musleabihf/sysroot/usr/include/arpa/inet.h:9,
                 from ../../include/internal/internal.h:14,
                 from proto.c:2:
/home/buildroot/autobuild/instance-3/output-1/host/arm-buildroot-linux-musleabihf/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
   23 | struct in6_addr {
      |        ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/19931aba8bee8867a53130ca4a53cfadbc4c5bfd

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-fix-build-with-kernel-5-15-and-musl.patch | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch

diff --git a/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch b/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch
new file mode 100644
index 0000000000..9e96594120
--- /dev/null
+++ b/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch
@@ -0,0 +1,60 @@
+From 21ee35dde73aec5eba35290587d479218c6dd824 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Thu, 24 Feb 2022 15:01:11 +0100
+Subject: conntrack: fix build with kernel 5.15 and musl
+
+Currently, with kernel 5.15 headers and musl building is failing with
+redefinition errors due to a conflict between the kernel and musl headers.
+
+Musl is able to suppres the conflicting kernel header definitions if they
+are included after the standard libc ones, however since ICMP definitions
+were moved into a separate internal header to avoid duplication this has
+stopped working and is breaking the builds.
+
+It seems that the issue is that <netinet/in.h> which contains the UAPI
+suppression defines is included in the internal.h header and not in the
+proto.h which actually includes the kernel ICMP headers and thus UAPI
+supression defines are not present.
+
+Solve this by moving the <netinet/in.h> include before the ICMP kernel
+includes in the proto.h
+
+Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Florian Westphal <fw@strlen.de>
+
+[Retrieved from:
+https://git.netfilter.org/libnetfilter_conntrack/commit/?id=21ee35dde73aec5eba35290587d479218c6dd824]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ include/internal/internal.h | 1 -
+ include/internal/proto.h    | 1 +
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/internal/internal.h b/include/internal/internal.h
+index 2ef8a90..7cd7c44 100644
+--- a/include/internal/internal.h
++++ b/include/internal/internal.h
+@@ -14,7 +14,6 @@
+ #include <arpa/inet.h>
+ #include <time.h>
+ #include <errno.h>
+-#include <netinet/in.h>
+ 
+ #include <libnfnetlink/libnfnetlink.h>
+ #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
+diff --git a/include/internal/proto.h b/include/internal/proto.h
+index 40e7bfe..60a5f4e 100644
+--- a/include/internal/proto.h
++++ b/include/internal/proto.h
+@@ -2,6 +2,7 @@
+ #define _NFCT_PROTO_H_
+ 
+ #include <stdint.h>
++#include <netinet/in.h>
+ #include <linux/icmp.h>
+ #include <linux/icmpv6.h>
+ 
+-- 
+cgit v1.2.3
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libnetfilter_conntrack: fix musl build with headers >= 5.15
  2022-03-13  9:02 [Buildroot] [PATCH 1/1] package/libnetfilter_conntrack: fix musl build with headers >= 5.15 Fabrice Fontaine
@ 2022-03-21 21:17 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2022-03-21 21:17 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 13/03/2022 10:02, Fabrice Fontaine wrote:
> Fix the following build failure with musl and headers >= 5.15 raised
> since bump to version 1.0.9 in commit
> 9af9dfa543907c46091c706b0f3a0eb89445ae74:
> 
> In file included from /home/buildroot/autobuild/instance-3/output-1/host/arm-buildroot-linux-musleabihf/sysroot/usr/include/arpa/inet.h:9,
>                   from ../../include/internal/internal.h:14,
>                   from proto.c:2:
> /home/buildroot/autobuild/instance-3/output-1/host/arm-buildroot-linux-musleabihf/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
>     23 | struct in6_addr {
>        |        ^~~~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/19931aba8bee8867a53130ca4a53cfadbc4c5bfd
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...-fix-build-with-kernel-5-15-and-musl.patch | 60 +++++++++++++++++++
>   1 file changed, 60 insertions(+)
>   create mode 100644 package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch
> 
> diff --git a/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch b/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch
> new file mode 100644
> index 0000000000..9e96594120
> --- /dev/null
> +++ b/package/libnetfilter_conntrack/0001-conntrack-fix-build-with-kernel-5-15-and-musl.patch
> @@ -0,0 +1,60 @@
> +From 21ee35dde73aec5eba35290587d479218c6dd824 Mon Sep 17 00:00:00 2001
> +From: Robert Marko <robimarko@gmail.com>
> +Date: Thu, 24 Feb 2022 15:01:11 +0100
> +Subject: conntrack: fix build with kernel 5.15 and musl
> +
> +Currently, with kernel 5.15 headers and musl building is failing with
> +redefinition errors due to a conflict between the kernel and musl headers.
> +
> +Musl is able to suppres the conflicting kernel header definitions if they
> +are included after the standard libc ones, however since ICMP definitions
> +were moved into a separate internal header to avoid duplication this has
> +stopped working and is breaking the builds.
> +
> +It seems that the issue is that <netinet/in.h> which contains the UAPI
> +suppression defines is included in the internal.h header and not in the
> +proto.h which actually includes the kernel ICMP headers and thus UAPI
> +supression defines are not present.
> +
> +Solve this by moving the <netinet/in.h> include before the ICMP kernel
> +includes in the proto.h
> +
> +Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
> +Signed-off-by: Robert Marko <robimarko@gmail.com>
> +Signed-off-by: Florian Westphal <fw@strlen.de>
> +
> +[Retrieved from:
> +https://git.netfilter.org/libnetfilter_conntrack/commit/?id=21ee35dde73aec5eba35290587d479218c6dd824]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + include/internal/internal.h | 1 -
> + include/internal/proto.h    | 1 +
> + 2 files changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/include/internal/internal.h b/include/internal/internal.h
> +index 2ef8a90..7cd7c44 100644
> +--- a/include/internal/internal.h
> ++++ b/include/internal/internal.h
> +@@ -14,7 +14,6 @@
> + #include <arpa/inet.h>
> + #include <time.h>
> + #include <errno.h>
> +-#include <netinet/in.h>
> +
> + #include <libnfnetlink/libnfnetlink.h>
> + #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
> +diff --git a/include/internal/proto.h b/include/internal/proto.h
> +index 40e7bfe..60a5f4e 100644
> +--- a/include/internal/proto.h
> ++++ b/include/internal/proto.h
> +@@ -2,6 +2,7 @@
> + #define _NFCT_PROTO_H_
> +
> + #include <stdint.h>
> ++#include <netinet/in.h>
> + #include <linux/icmp.h>
> + #include <linux/icmpv6.h>
> +
> +--
> +cgit v1.2.3
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-21 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-13  9:02 [Buildroot] [PATCH 1/1] package/libnetfilter_conntrack: fix musl build with headers >= 5.15 Fabrice Fontaine
2022-03-21 21:17 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.