• Frederic Weisbecker's avatar
    perf tools: Fix accidentally preprocessed snprintf callback · fcd14984
    Frederic Weisbecker authored
    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: default avatarFrederic 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    fcd14984
hist.c 15.2 KB