1. 21 7月, 2017 1 次提交
  2. 27 4月, 2017 1 次提交
  3. 19 8月, 2016 1 次提交
    • V
      tools lib: Reinstate strlcpy() header guard with __UCLIBC__ · 0215d59b
      Vineet Gupta 提交于
      perf tools build in recent kernels spews splat when cross compiling with uClibc:
      
      |   CC       util/alias.o
      | In file included from tools/perf/util/../ui/../util/cache.h:8:0,
      |                 from tools/perf/util/../ui/helpline.h:7,
      |                 from tools/perf/util/debug.h:8,
      |                 from arch/../util/cpumap.h:9,
      |                 from arch/../util/env.h:5,
      |                 from arch/common.h:4,
      |                 from arch/common.c:3:
      | tools/include/linux/string.h:12:15: warning: redundant redeclaration of ‘strlcpy’ [-Wredundant-decls]
      |  extern size_t strlcpy(char *dest, const char *src, size_t size);
                     ^
      This is after commit 61a6445e ("tools lib: Guard the strlcpy() header with
      __GLIBC__").
      
      The problem is uClibc also defines __GLIBC__ for exported headers for
      applications. So add that specific check to not trip for uClibc.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Petri Gynther <pgynther@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: linux-snps-arc@lists.infradead.org
      Link: http://lkml.kernel.org/r/1471537703-16439-1-git-send-email-vgupta@synopsys.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0215d59b
  4. 13 7月, 2016 2 次提交
    • A
      tools lib: Guard the strlcpy() header with __GLIBC__ · 61a6445e
      Arnaldo Carvalho de Melo 提交于
      Better to whitelist it for libraries that require it (glibc) than
      blacklist it with the ones that don't (uclibc, musl libc, etc).
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-52ih0m63a2n63tanpy6yj682@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      61a6445e
    • A
      tools: Introduce str_error_r() · c8b5f2c9
      Arnaldo Carvalho de Melo 提交于
      The tools so far have been using the strerror_r() GNU variant, that
      returns a string, be it the buffer passed or something else.
      
      But that, besides being tricky in cases where we expect that the
      function using strerror_r() returns the error formatted in a provided
      buffer (we have to check if it returned something else and copy that
      instead), breaks the build on systems not using glibc, like Alpine
      Linux, where musl libc is used.
      
      So, introduce yet another wrapper, str_error_r(), that has the GNU
      interface, but uses the portable XSI variant of strerror_r(), so that
      users rest asured that the provided buffer is used and it is what is
      returned.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c8b5f2c9
  5. 17 12月, 2015 1 次提交
  6. 19 11月, 2015 2 次提交