Skip to content

Commit 8facdd4

Browse files
author
Herton R. Krzesinski
committed
uapi: add missing ip/ipv6 header dependencies for linux/stddef.h
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2166738 Upstream Status: RHEL only Note: this patch is for RHEL/centos right now, to quickly fix the issue, however I plan to submit this upstream asap. Since commit 58e0be1 ("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. Fixes: 58e0be1 ("net: use struct_group to copy ip/ipv6 header addresses") Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
1 parent 63f076b commit 8facdd4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/uapi/linux/ip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#ifndef _UAPI_LINUX_IP_H
1919
#define _UAPI_LINUX_IP_H
2020
#include <linux/types.h>
21+
#include <linux/stddef.h>
2122
#include <asm/byteorder.h>
2223

2324
#define IPTOS_TOS_MASK 0x1E

include/uapi/linux/ipv6.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/libc-compat.h>
66
#include <linux/types.h>
7+
#include <linux/stddef.h>
78
#include <linux/in6.h>
89
#include <asm/byteorder.h>
910

0 commit comments

Comments
 (0)