From: Adrian Szyndela Date: Tue, 12 Sep 2017 13:49:48 +0000 (+0200) Subject: corrected snprintf format to match needed 64-bits X-Git-Tag: submit/tizen_4.0/20171018.110122~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1aa18fe2c5cb126555c68b7ba3a3bdf28d6fab64;p=platform%2Fupstream%2Fbcc.git corrected snprintf format to match needed 64-bits Change-Id: Ied3890d6a25a814a48847f83b8e987b97436f042 --- diff --git a/src/cc/libbpf.c b/src/cc/libbpf.c index f0c372b9..50d9d01f 100644 --- a/src/cc/libbpf.c +++ b/src/cc/libbpf.c @@ -42,6 +42,7 @@ #include #include #include +#include #include "libbpf.h" #include "perf_reader.h" @@ -533,7 +534,7 @@ void * bpf_attach_uprobe(int progfd, enum bpf_probe_attach_type attach_type, con goto error; } - n = snprintf(buf, sizeof(buf), "%c:%ss/%s %s:0x%lx", attach_type==BPF_PROBE_ENTRY ? 'p' : 'r', + n = snprintf(buf, sizeof(buf), "%c:%ss/%s %s:0x%"PRIx64, attach_type==BPF_PROBE_ENTRY ? 'p' : 'r', event_type, new_name, binary_path, offset); if (n >= sizeof(buf)) { fprintf(stderr, "Name too long for uprobe; ev_name (%s) is probably too long\n", ev_name);