Commit 775a2be5 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Alexei Starovoitov

selftests/bpf: Declare bpf_log_buf variables as static

The cgroup selftests did not declare the bpf_log_buf variable as static, leading
to a linker error with GCC 10 (which defaults to -fno-common). Fix this by
adding the missing static declarations.

Fixes: 257c8855 ("selftests/bpf: Convert test_cgroup_attach to prog_tests")
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrey Ignatov <rdna@fb.com>
Link: https://lore.kernel.org/bpf/20200302145348.559177-1-toke@redhat.com
parent 441420a1
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null" #define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null"
char bpf_log_buf[BPF_LOG_BUF_SIZE]; static char bpf_log_buf[BPF_LOG_BUF_SIZE];
static int prog_load(void) static int prog_load(void)
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null" #define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null"
char bpf_log_buf[BPF_LOG_BUF_SIZE]; static char bpf_log_buf[BPF_LOG_BUF_SIZE];
static int map_fd = -1; static int map_fd = -1;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define BAR "/foo/bar/" #define BAR "/foo/bar/"
#define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null" #define PING_CMD "ping -q -c1 -w1 127.0.0.1 > /dev/null"
char bpf_log_buf[BPF_LOG_BUF_SIZE]; static char bpf_log_buf[BPF_LOG_BUF_SIZE];
static int prog_load(int verdict) static int prog_load(int verdict)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment