The libtraceevent uses str_error_r() but its implementation is outside
of the library.  So if an external program wants to link the
libtraceevent it'd fail due to missing str_error_r.  Add it.

Signed-off-by: Namhyung Kim <[email protected]>
---
 tools/lib/traceevent/Build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/lib/traceevent/Build b/tools/lib/traceevent/Build
index c681d0575d16..a4efdf7876ce 100644
--- a/tools/lib/traceevent/Build
+++ b/tools/lib/traceevent/Build
@@ -4,6 +4,10 @@ libtraceevent-y += trace-seq.o
 libtraceevent-y += parse-filter.o
 libtraceevent-y += parse-utils.o
 libtraceevent-y += kbuffer-parse.o
+libtraceevent-y += str_error_r.o
+
+str_error_r.o: ../str_error_r.c
+       $(call if_changed_dep,cc_o_c)
 
 plugin_jbd2-y         += plugin_jbd2.o
 plugin_hrtimer-y      += plugin_hrtimer.o
-- 
2.9.2

Reply via email to