[PATCH] Fix 'libbpf: failed to find BTF info for global/extern symbol' since uninitialized global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 examples/c/usdt.bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/c/usdt.bpf.c b/examples/c/usdt.bpf.c
index 49ba506..2612ec1 100644
--- a/examples/c/usdt.bpf.c
+++ b/examples/c/usdt.bpf.c
@@ -5,7 +5,7 @@
 #include <bpf/bpf_tracing.h>
 #include <bpf/usdt.bpf.h>
 
-pid_t my_pid;
+pid_t my_pid = 0;
 
 SEC("usdt/libc.so.6:libc:setjmp")
 int BPF_USDT(usdt_auto_attach, void *arg1, int arg2, void *arg3)
-- 
2.37.2





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux