Since commit 58e0be1ef6118 ("net: use struct_group to copy ip/ipv6 header addresses"), ip and ipv6 headers started to use the __struct_group definition, which is defined at include/uapi/linux/stddef.h. However, linux/stddef.h isn't explicitly included in include/uapi/linux/{ip,ipv6}.h, which breaks build of xskxceiver bpf selftest if you install the uapi headers in the system: $ make V=1 xskxceiver -C tools/testing/selftests/bpf ... make: Entering directory '(...)/tools/testing/selftests/bpf' gcc -g -O0 -rdynamic -Wall -Werror (...) In file included from xskxceiver.c:79: /usr/include/linux/ip.h:103:9: error: expected specifier-qualifier-list before ‘__struct_group’ 103 | __struct_group(/* no tag */, addrs, /* no attrs */, | ^~~~~~~~~~~~~~ ... Include the missing <linux/stddef.h> dependency in ip.h and do the same for the ipv6.h header.
Showing the changes to include/uapi/linux (2 of 2 files). Show all
Unified · Split
| @@ -18,6 +18,7 @@ · 17 unmodified lines | |||
| 18 | #ifndef _UAPI_LINUX_IP_H | 18 | #ifndef _UAPI_LINUX_IP_H |
| 19 | #define _UAPI_LINUX_IP_H | 19 | #define _UAPI_LINUX_IP_H |
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <linux/stddef.h> | ||
| 21 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
| 22 | 23 | ||
| 23 | #define IPTOS_TOS_MASK 0x1E | 24 | #define IPTOS_TOS_MASK 0x1E |
| @@ -4,6 +4,7 @@ · 3 unmodified lines | |||
| 4 | 4 | ||
| 5 | #include <linux/libc-compat.h> | 5 | #include <linux/libc-compat.h> |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | #include <linux/stddef.h> | ||
| 7 | #include <linux/in6.h> | 8 | #include <linux/in6.h> |
| 8 | #include <asm/byteorder.h> | 9 | #include <asm/byteorder.h> |
| 9 | 10 | ||