From e5e8352a3243aee6f8318a17d289e3275cb1f249 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 17 Sep 2014 02:02:22 +0200 Subject: [PATCH] work around strange link error with clang on Mac OS X --- ASFilter/asfilter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ASFilter/asfilter.cc b/ASFilter/asfilter.cc index 9df9cfa647..447ff72a54 100644 --- a/ASFilter/asfilter.cc +++ b/ASFilter/asfilter.cc @@ -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( argv3.data() ));