Skip to content

Commit 93c0e8f

Browse files
author
Herton R. Krzesinski
committed
uapi: Fix undefined __always_inline on non-glibc systems
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2166738 This commit is needed because recent update to include/uapi/linux/ip.h header broke the build of bpf selftests: + pushd tools/testing/selftests + /usr/bin/make -s (...) In file included from In file included from progs/cg_storage_multi_isolated.cprogs/cg_storage_multi_shared.c::9: 9: /usr/include/linux/ip.h/usr/include/linux/ip.h::103103::22:: error: error: type name requires a specifier or qualifiertype name requires a specifier or qualifier __struct_group(/* no tag */, addrs, /* no attrs */, ^ __struct_group(/* no tag */, addrs, /* no attrs */,/usr/include/linux/ip.h : ^103 :29: error: expected parameter declarator The full log can be seen at: https://kojihub.stream.rdu2.redhat.com/kojifiles/work/tasks/9639/1889639/build.log The backported commit from upstream here indirectly includes stddef through the byteorder headers, and this ends up indirectly included through other headers, fixing the problem. Probably also why upstream doesn't have this problem while we hit it in centos stream 9. commit cb8747b Author: Ismael Luceno <ismael@iodev.co.uk> Date: Mon Nov 15 14:46:47 2021 +0100 uapi: Fix undefined __always_inline on non-glibc systems This macro is defined by glibc itself, which makes the issue go unnoticed on those systems. On non-glibc systems it causes build failures on several utilities and libraries, like bpftool and objtool. Fixes: 1d509f2 ("x86/insn: Support big endian cross-compiles") Fixes: 2d7ce0e ("tools/virtio: more stubs") Fixes: 3fb321f ("selftests/net: ipv6 flowlabel") Fixes: 50b3ed5 ("selftests/bpf: test bpf flow dissection") Fixes: 9cacf81 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE") Fixes: a4b2061 ("tools include uapi: Grab a copy of linux/in.h") Fixes: b12d6ec ("bpf: btf: add btf print functionality") Fixes: c0dd967 ("tools, include: Grab a copy of linux/erspan.h") Fixes: c4b6014 ("tools: Add copy of perf_event.h to tools/include/linux/") Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20211115134647.1921-1-ismael@iodev.co.uk Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
1 parent 799a92a commit 93c0e8f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/uapi/linux/byteorder/big_endian.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define __BIG_ENDIAN_BITFIELD
1010
#endif
1111

12+
#include <linux/stddef.h>
1213
#include <linux/types.h>
1314
#include <linux/swab.h>
1415

include/uapi/linux/byteorder/little_endian.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define __LITTLE_ENDIAN_BITFIELD
1010
#endif
1111

12+
#include <linux/stddef.h>
1213
#include <linux/types.h>
1314
#include <linux/swab.h>
1415

0 commit comments

Comments
 (0)