Skip to content

Commit e03fb36

Browse files
author
Benjamin Tissoires
committed
selftests/hid: fix bpf compilations due to -fms-extensions
Similar to commit 835a507 ("selftests/bpf: Add -fms-extensions to bpf build flags") and commit 639f58a ("bpftool: Fix build warnings due to MS extensions") The kernel is now built with -fms-extensions, therefore generated vmlinux.h contains types like: struct slab { .. struct freelist_counters; }; Use -fms-extensions and -Wno-microsoft-anon-tag flags to build bpf programs that #include "vmlinux.h" Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
1 parent b7666c8 commit e03fb36

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/testing/selftests/hid/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ MENDIAN=$(if $(IS_LITTLE_ENDIAN),-mlittle-endian,-mbig-endian)
184184

185185
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG))
186186
BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \
187+
-Wno-microsoft-anon-tag \
188+
-fms-extensions \
187189
-I$(INCLUDE_DIR)
188190

189191
CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \

0 commit comments

Comments
 (0)