diff options
author | James Hilliard <james.hilliard1@gmail.com> | 2023-03-31 01:58:42 -0600 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-03-31 11:36:18 -0700 |
commit | 9af0f555ae4add25f0950753fb410c509aa71f50 (patch) | |
tree | f2d0024ce7ae1804197d1ee30f8b20308f2925d6 /tools/testing/selftests/bpf/prog_tests/task_kfunc.c | |
parent | e941933c4944b34fb4c7713d8c247108cede10f3 (diff) |
selftests/bpf: Fix conflicts with built-in functions in bench_local_storage_create
The fork function in gcc is considered a built in function due to
being used by libgcov when building with gnu extensions.
Rename fork to sched_process_fork to prevent this conflict.
See details:
https://github.com/gcc-mirror/gcc/commit/d1c38823924506d389ca58d02926ace21bdf82fa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82457
Fixes the following error:
In file included from progs/bench_local_storage_create.c:6:
progs/bench_local_storage_create.c:43:14: error: conflicting types for
built-in function 'fork'; expected 'int(void)'
[-Werror=builtin-declaration-mismatch]
43 | int BPF_PROG(fork, struct task_struct *parent, struct
task_struct *child)
| ^~~~
Fixes: cbe9d93d58b1 ("selftests/bpf: Add bench for task storage creation")
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230331075848.1642814-1-james.hilliard1@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/task_kfunc.c')
0 files changed, 0 insertions, 0 deletions