perf tools: Fix accidentally preprocessed snprintf callback
struct sort_entry has a callback named snprintf that turns an entry into a string result. But there are glibc versions that implement snprintf through a macro. The following expression is then going to get the snprintf call preprocessed: ent->snprintf(...) to finally end up in a build error: util/hist.c: Dans la fonction «hist_entry__snprintf» : util/hist.c:539: erreur: «struct sort_entry» has no member named «__builtin___snprintf_chk» To fix this, prepend struct sort_entry callbacks with an "se_" prefix. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
df8290bf7e
commit
fcd1498405
@@ -78,13 +78,13 @@ enum sort_type {
|
||||
struct sort_entry {
|
||||
struct list_head list;
|
||||
|
||||
const char *header;
|
||||
const char *se_header;
|
||||
|
||||
int64_t (*cmp)(struct hist_entry *, struct hist_entry *);
|
||||
int64_t (*collapse)(struct hist_entry *, struct hist_entry *);
|
||||
int (*snprintf)(struct hist_entry *self, char *bf, size_t size,
|
||||
unsigned int width);
|
||||
unsigned int *width;
|
||||
int64_t (*se_cmp)(struct hist_entry *, struct hist_entry *);
|
||||
int64_t (*se_collapse)(struct hist_entry *, struct hist_entry *);
|
||||
int (*se_snprintf)(struct hist_entry *self, char *bf, size_t size,
|
||||
unsigned int width);
|
||||
unsigned int *se_width;
|
||||
bool elide;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user