“1278255e19dee6eef31fa7c23f966014e8348621”上不存在“paddle/fluid/lite/git@gitcode.net:Crayonxin2000/Paddle.git”
提交 03702d4d 编写于 作者: H Herton R. Krzesinski 提交者: David S. Miller

uapi: add missing ip/ipv6 header dependencies for linux/stddef.h

Since commit 58e0be1e ("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: 58e0be1e ("net: use struct_group to copy ip/ipv6 header addresses")
Signed-off-by: NHerton R. Krzesinski <herton@redhat.com>
Reviewed-by: NCarlos O'Donell <carlos@redhat.com>
Tested-by: NCarlos O'Donell <carlos@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c1d2ecdf
......@@ -18,6 +18,7 @@
#ifndef _UAPI_LINUX_IP_H
#define _UAPI_LINUX_IP_H
#include <linux/types.h>
#include <linux/stddef.h>
#include <asm/byteorder.h>
#define IPTOS_TOS_MASK 0x1E
......
......@@ -4,6 +4,7 @@
#include <linux/libc-compat.h>
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/in6.h>
#include <asm/byteorder.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册