libbpf: Fix usdt_cookie being cast to 32 bits

The usdt_cookie is defined as __u64, which should not be
used as a long type because it will be cast to 32 bits
in 32-bit platforms.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220419145238.482134-2-pulehui@huawei.com
This commit is contained in:
Pu Lehui authored and Andrii Nakryiko committed 2022-04-27 15:19:08 -07:00
1 parent e205664ddb
commit bddd106e80
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -571,6 +571,6 @@ struct bpf_link * usdt_manager_attach_usdt(struct usdt_manager *man,
const struct bpf_program *prog,
pid_t pid, const char *path,
const char *usdt_provider, const char *usdt_name,
long usdt_cookie);
__u64 usdt_cookie);
#endif /* __LIBBPF_LIBBPF_INTERNAL_H */