From: Francesco Chemolli Date: Mon, 29 Dec 2014 10:35:30 +0000 (+0100) Subject: Try to disable move semantics for domaincontroller to work around clang bug in centos 6 X-Git-Tag: merge-candidate-3-v1~410^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be9bdf6a07d8b8973601ac5b9e7d5220f68928c1;p=thirdparty%2Fsquid.git Try to disable move semantics for domaincontroller to work around clang bug in centos 6 --- diff --git a/helpers/basic_auth/MSNT/msntauth.cc b/helpers/basic_auth/MSNT/msntauth.cc index 848660932d..a56ff0a6e8 100644 --- a/helpers/basic_auth/MSNT/msntauth.cc +++ b/helpers/basic_auth/MSNT/msntauth.cc @@ -56,6 +56,16 @@ static char msntauth_version[] = "Msntauth v3.0.0 (C) 2 Sep 2001 Stellar-X Anton struct domaincontroller { std::string domain; std::string server; + domaincontroller(const std::string &d, const std::string & s) : + domain(d), server(s) + {} + domaincontroller (const domaincontroller &d) : + domain(d.domain), server(d.server) + {} +#if 0 && __cplusplus >= 201103L + // disable move constructor to work around centos-6 clang bug + domaincontroller (domaincontroller &&) = delete; +#endif }; typedef std::vector domaincontrollers_t; domaincontrollers_t domaincontrollers; @@ -101,9 +111,7 @@ main(int argc, char **argv) std::cerr << "Error: can't understand domain controller specification '" << arg << "'. Ignoring" << std::endl; } - domaincontroller dc; - dc.domain = arg.substr(0,pos); - dc.server = arg.substr(pos+1); + domaincontroller dc(arg.substr(0,pos), arg.substr(pos+1)); if (dc.domain.length() == 0 || dc.server.length() == 0) { std::cerr << "Error: invalid domain specification in '" << arg << "'. Ignoring." << std::endl;