ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / package / libs / libnetfilter-conntrack / patches / 0001-conntrack-fix-build-with-kernel-5_15-and-musl.patch
1 From 21ee35dde73aec5eba35290587d479218c6dd824 Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robimarko@gmail.com>
3 Date: Thu, 24 Feb 2022 15:01:11 +0100
4 Subject: conntrack: fix build with kernel 5.15 and musl
5
6 Currently, with kernel 5.15 headers and musl building is failing with
7 redefinition errors due to a conflict between the kernel and musl headers.
8
9 Musl is able to suppres the conflicting kernel header definitions if they
10 are included after the standard libc ones, however since ICMP definitions
11 were moved into a separate internal header to avoid duplication this has
12 stopped working and is breaking the builds.
13
14 It seems that the issue is that <netinet/in.h> which contains the UAPI
15 suppression defines is included in the internal.h header and not in the
16 proto.h which actually includes the kernel ICMP headers and thus UAPI
17 supression defines are not present.
18
19 Solve this by moving the <netinet/in.h> include before the ICMP kernel
20 includes in the proto.h
21
22 Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
23 Signed-off-by: Robert Marko <robimarko@gmail.com>
24 Signed-off-by: Florian Westphal <fw@strlen.de>
25 ---
26 include/internal/internal.h | 1 -
27 include/internal/proto.h | 1 +
28 2 files changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/include/internal/internal.h
31 +++ b/include/internal/internal.h
32 @@ -14,7 +14,6 @@
33 #include <arpa/inet.h>
34 #include <time.h>
35 #include <errno.h>
36 -#include <netinet/in.h>
37
38 #include <libnfnetlink/libnfnetlink.h>
39 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
40 --- a/include/internal/proto.h
41 +++ b/include/internal/proto.h
42 @@ -2,6 +2,7 @@
43 #define _NFCT_PROTO_H_
44
45 #include <stdint.h>
46 +#include <netinet/in.h>
47 #include <linux/icmp.h>
48 #include <linux/icmpv6.h>
49