aboutsummaryrefslogtreecommitdiff
path: root/contrib/atf
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2016-09-29 09:16:02 +0000
committerRuslan Bukin <br@FreeBSD.org>2016-09-29 09:16:02 +0000
commitc5072d5c9403487b92bc9f08357a9d002221f1ad (patch)
treed850b08846ba02bb847a1cf6b9e0d74e1c990787 /contrib/atf
parent6c78e95a8087d838593a9d63aa07ab660e359142 (diff)
downloadsrc-c5072d5c9403487b92bc9f08357a9d002221f1ad.tar.gz
src-c5072d5c9403487b92bc9f08357a9d002221f1ad.zip
Fix conversion from C++ std::string into C const char *.
This fixes operation on MIPS64EB with GCC 4.2.1. Reviewed by: jmmv Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7952
Notes
Notes: svn path=/head/; revision=306440
Diffstat (limited to 'contrib/atf')
-rw-r--r--contrib/atf/atf-sh/atf-check.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/atf/atf-sh/atf-check.cpp b/contrib/atf/atf-sh/atf-check.cpp
index 866b7bb483a2..414b64ea91f0 100644
--- a/contrib/atf/atf-sh/atf-check.cpp
+++ b/contrib/atf/atf-sh/atf-check.cpp
@@ -346,9 +346,10 @@ std::auto_ptr< atf::check::check_result >
execute_with_shell(char* const* argv)
{
const std::string cmd = flatten_argv(argv);
+ const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL);
const char* sh_argv[4];
- sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str();
+ sh_argv[0] = shell.c_str();
sh_argv[1] = "-c";
sh_argv[2] = cmd.c_str();
sh_argv[3] = NULL;