1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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
This commit is contained in:
Ruslan Bukin 2016-09-29 09:16:02 +00:00
parent 6c78e95a80
commit c5072d5c94
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306440

View File

@ -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;