diff --git a/libboost/config/workaround.hpp b/libboost/config/workaround.hpp new file mode 100644 index 000000000..b79c6b7ea --- /dev/null +++ b/libboost/config/workaround.hpp @@ -0,0 +1,5 @@ +#ifndef __clang_major__ +#define __clang_major___WORKAROUND_GUARD 1 +#else +#define __clang_major___WORKAROUND_GUARD 0 +#endif diff --git a/libtest/server_container.cc b/libtest/server_container.cc index e12dbc084..dee2630a5 100644 --- a/libtest/server_container.cc +++ b/libtest/server_container.cc @@ -49,7 +49,9 @@ // trim from end static inline std::string &rtrim(std::string &s) { - s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end()); + s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { + return !std::isspace(ch); + }).base(), s.end()); return s; } diff --git a/m4/bottom.m4 b/m4/bottom.m4 index b893603d3..f8181e53e 100644 --- a/m4/bottom.m4 +++ b/m4/bottom.m4 @@ -54,6 +54,8 @@ typedef unsigned long int ulong; #define MSG_DONTWAIT 0 #endif // HAVE_MSG_DONTWAIT +#include "libboost/config/workaround.hpp" + ]) ])dnl CONFIG_EXTRA