Musl defines its own struct ethhdr and thus defines __UAPI_DEF_ETHHDR to zero. To avoid struct redefinition errors, user space is therefore supposed to include netinet/if_ether.h before (or instead of) linux/if_ether.h. To relieve them from this burden, include the libc header here if not building for kernel space.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -5,6 +5,10 @@ · 4 unmodified lines | ||
| 5 | 5 | /* bridge-specific defines for netfilter. |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +#ifndef __KERNEL__ | |
| 9 | +#include <netinet/if_ether.h> /* for __UAPI_DEF_ETHHDR if defined */ | |
| 10 | +#endif | |
| 11 | + | |
| 8 | 12 | #include <linux/in.h> |
| 9 | 13 | #include <linux/netfilter.h> |
| 10 | 14 | #include <linux/if_ether.h> |