Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools lib api: Add str_error_c to libapi

Because it uses that function, which would lead every tool using it
to need to link against tools/lib/str_error_r.o.

This fixes building tools/vm/, that links with libapi.

Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
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>
Fixes: b31e3e3316a7 ("tools lib api fs: Use str_error_r()")
Link: http://lkml.kernel.org/n/tip-aedt3qzibhnhaov2j4caqi61@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+5 -6
+5
tools/lib/api/Build
··· 2 2 libapi-y += fs/ 3 3 libapi-y += cpu.o 4 4 libapi-y += debug.o 5 + libapi-y += str_error_r.o 6 + 7 + $(OUTPUT)str_error_r.o: ../str_error_r.c FORCE 8 + $(call rule_mkdir) 9 + $(call if_changed_dep,cc_o_c)
-5
tools/perf/util/Build
··· 70 70 libperf-y += stat-shadow.o 71 71 libperf-y += record.o 72 72 libperf-y += srcline.o 73 - libperf-y += str_error_r.o 74 73 libperf-y += data.o 75 74 libperf-y += tsc.o 76 75 libperf-y += cloexec.o ··· 172 173 $(call if_changed_dep,cc_o_c) 173 174 174 175 $(OUTPUT)util/libstring.o: ../lib/string.c FORCE 175 - $(call rule_mkdir) 176 - $(call if_changed_dep,cc_o_c) 177 - 178 - $(OUTPUT)util/str_error_r.o: ../lib/str_error_r.c FORCE 179 176 $(call rule_mkdir) 180 177 $(call if_changed_dep,cc_o_c) 181 178
-1
tools/perf/util/python-ext-sources
··· 13 13 ../lib/bitmap.c 14 14 ../lib/find_bit.c 15 15 ../lib/hweight.c 16 - ../lib/str_error_r.c 17 16 ../lib/vsprintf.c 18 17 util/thread_map.c 19 18 util/util.c