corrected snprintf format to match needed 64-bits 92/149592/2
authorAdrian Szyndela <adrian.s@samsung.com>
Tue, 12 Sep 2017 13:49:48 +0000 (15:49 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Fri, 29 Sep 2017 07:51:25 +0000 (09:51 +0200)
Change-Id: Ied3890d6a25a814a48847f83b8e987b97436f042

src/cc/libbpf.c

index f0c372b..50d9d01 100644 (file)
@@ -42,6 +42,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #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);