Commit a83d869f300bf91df07443b5272db7a5a8eb18b7

Authored by Vineet Gupta
Committed by Arnaldo Carvalho de Melo
1 parent db1806edcf

perf tools: Elide strlcpy warning with uclibc

----------------->8------------------
  CC       bench/sched-pipe.o
In file included from builtin-annotate.c:13:0:
util/cache.h:76:15: warning: redundant redeclaration of 'strlcpy'
[-Wredundant-decls]
 extern size_t strlcpy(char *dest, const char *src, size_t size);
               ^
In file included from util/util.h:55:0,
                 from builtin.h:4,
                 from builtin-annotate.c:8:
~/vineetg/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/string.h:396:15:
note: previous declaration of 'strlcpy' was here
 extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
   ----------------->8------------------

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1421156604-30603-3-git-send-email-vgupta@synopsys.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

tools/perf/util/cache.h
... ... @@ -71,8 +71,10 @@
71 71 extern char *perf_pathdup(const char *fmt, ...)
72 72 __attribute__((format (printf, 1, 2)));
73 73  
  74 +#ifndef __UCLIBC__
74 75 /* Matches the libc/libbsd function attribute so we declare this unconditionally: */
75 76 extern size_t strlcpy(char *dest, const char *src, size_t size);
  77 +#endif
76 78  
77 79 #endif /* __PERF_CACHE_H */