work around strange link error with clang on Mac OS X

This commit is contained in:
Wolfgang Thaller 2014-09-17 02:02:22 +02:00
parent 822c9f3dbf
commit e5e8352a32

View File

@ -112,7 +112,9 @@ int main(int argc, char *argv[])
close(fd);
std::transform(argv2.begin(), argv2.end(), std::back_inserter(argv3), std::bind(&std::string::c_str, _1));
std::transform(argv2.begin(), argv2.end(), std::back_inserter(argv3),
[](const std::string& str) { return str.c_str(); });
argv3.push_back(NULL);
execvp(argv3[0], const_cast<char*const*>( argv3.data() ));