conntrack: fix build with kernel 5.15 and musl
PATCH 1/1 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
--- include/internal/internal.h | 1 - include/internal/proto.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
include/internal/internal.h +0 -1
@@ -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>
include/internal/proto.h +1 -0
@@ -2,6 +2,7 @@#define _NFCT_PROTO_H_#include <stdint.h> +#include <netinet/in.h> #include <linux/icmp.h> #include <linux/icmpv6.h>
Signature · 1 line
2.35.1