Including <linux/in.h> and <netinet/in.h> in the dependencies breaks compilation of trinity due to multiple definitions. <linux/in.h> is only used in <linux/icmp.h> to provide the definition of the struct in_addr, but this can be substituted out by using the datatype __be32.
Unified · Split
| @@ -20,7 +20,6 @@ · 19 unmodified lines | ||
| 20 | 20 | |
| 21 | 21 | #include <linux/types.h> |
| 22 | 22 | #include <asm/byteorder.h> |
| 23 | −#include <linux/in.h> | |
| 24 | 23 | #include <linux/if.h> |
| 25 | 24 | #include <linux/in6.h> |
| 26 | 25 | |
| @@ -154,7 +153,7 @@ struct icmp_ext_echo_iio { · 127 unmodified lines | ||
| 154 | 153 | struct { |
| 155 | 154 | struct icmp_ext_echo_ctype3_hdr ctype3_hdr; |
| 156 | 155 | union { |
| 157 | − struct in_addr ipv4_addr; | |
| 156 | + __be32 ipv4_addr; | |
| 158 | 157 | struct in6_addr ipv6_addr; |
| 159 | 158 | } ip_addr; |
| 160 | 159 | } addr; |
| @@ -1059,7 +1059,7 @@ static bool icmp_echo(struct sk_buff *skb) · 1058 unmodified lines | ||
| 1059 | 1059 | if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + |
| 1060 | 1060 | sizeof(struct in_addr)) |
| 1061 | 1061 | goto send_mal_query; |
| 1062 | − dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr.s_addr); | |
| 1062 | + dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr); | |
| 1063 | 1063 | break; |
| 1064 | 1064 | #if IS_ENABLED(CONFIG_IPV6) |
| 1065 | 1065 | case ICMP_AFI_IP6: |