aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/subcmd/run-command.c5
-rw-r--r--tools/objtool/Build5
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/lib/subcmd/run-command.c b/tools/lib/subcmd/run-command.c
index f4f6c9eb8e59..911f83942723 100644
--- a/tools/lib/subcmd/run-command.c
+++ b/tools/lib/subcmd/run-command.c
@@ -3,6 +3,7 @@
3#include <sys/stat.h> 3#include <sys/stat.h>
4#include <fcntl.h> 4#include <fcntl.h>
5#include <string.h> 5#include <string.h>
6#include <linux/string.h>
6#include <errno.h> 7#include <errno.h>
7#include <sys/wait.h> 8#include <sys/wait.h>
8#include "subcmd-util.h" 9#include "subcmd-util.h"
@@ -109,7 +110,7 @@ int start_command(struct child_process *cmd)
109 110
110 if (cmd->dir && chdir(cmd->dir)) 111 if (cmd->dir && chdir(cmd->dir))
111 die("exec %s: cd to %s failed (%s)", cmd->argv[0], 112 die("exec %s: cd to %s failed (%s)", cmd->argv[0],
112 cmd->dir, strerror_r(errno, sbuf, sizeof(sbuf))); 113 cmd->dir, str_error_r(errno, sbuf, sizeof(sbuf)));
113 if (cmd->env) { 114 if (cmd->env) {
114 for (; *cmd->env; cmd->env++) { 115 for (; *cmd->env; cmd->env++) {
115 if (strchr(*cmd->env, '=')) 116 if (strchr(*cmd->env, '='))
@@ -173,7 +174,7 @@ static int wait_or_whine(pid_t pid)
173 if (errno == EINTR) 174 if (errno == EINTR)
174 continue; 175 continue;
175 fprintf(stderr, " Error: waitpid failed (%s)", 176 fprintf(stderr, " Error: waitpid failed (%s)",
176 strerror_r(errno, sbuf, sizeof(sbuf))); 177 str_error_r(errno, sbuf, sizeof(sbuf)));
177 return -ERR_RUN_COMMAND_WAITPID; 178 return -ERR_RUN_COMMAND_WAITPID;
178 } 179 }
179 if (waiting != pid) 180 if (waiting != pid)
diff --git a/tools/objtool/Build b/tools/objtool/Build
index 0e89258a3541..2457916a3943 100644
--- a/tools/objtool/Build
+++ b/tools/objtool/Build
@@ -5,9 +5,14 @@ objtool-y += special.o
5objtool-y += objtool.o 5objtool-y += objtool.o
6 6
7objtool-y += libstring.o 7objtool-y += libstring.o
8objtool-y += str_error_r.o
8 9
9CFLAGS += -I$(srctree)/tools/lib 10CFLAGS += -I$(srctree)/tools/lib
10 11
11$(OUTPUT)libstring.o: ../lib/string.c FORCE 12$(OUTPUT)libstring.o: ../lib/string.c FORCE
12 $(call rule_mkdir) 13 $(call rule_mkdir)
13 $(call if_changed_dep,cc_o_c) 14 $(call if_changed_dep,cc_o_c)
15
16$(OUTPUT)str_error_r.o: ../lib/str_error_r.c FORCE
17 $(call rule_mkdir)
18 $(call if_changed_dep,cc_o_c)