Date: Thu, 5 Jul 2018 10:31:36 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r473961 - head/www/sams2/files Message-ID: <201807051031.w65AVaEb057558@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Thu Jul 5 10:31:35 2018 New Revision: 473961 URL: https://svnweb.freebsd.org/changeset/ports/473961 Log: Fix build with Clang6. error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'std::stringstream' (aka 'basic_stringstream<char>')) Reported by: linimon Added: head/www/sams2/files/patch-src_datefilter.cpp (contents, props changed) head/www/sams2/files/patch-src_net.cpp (contents, props changed) Added: head/www/sams2/files/patch-src_datefilter.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/sams2/files/patch-src_datefilter.cpp Thu Jul 5 10:31:35 2018 (r473961) @@ -0,0 +1,29 @@ +Fix build with Clang6: stringstream doesn't have a viable overload +for ostream::operator<< . It does with Clang5. Use str() explicitly. + +--- src/datefilter.cpp.orig 2018-07-04 11:23:09 UTC ++++ src/datefilter.cpp +@@ -130,9 +130,10 @@ string DateFilter::getStartDateAsString () const + strftime (strbuf, sizeof (strbuf), "%Y-%m-%d", localtime (&_date_start)); + s << strbuf; + +- DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << s); ++ string r = s.str (); ++ DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << r); + +- return s.str (); ++ return r; + } + + string DateFilter::getEndDateAsString () const +@@ -143,7 +144,8 @@ string DateFilter::getEndDateAsString () const + strftime (strbuf, sizeof (strbuf), "%Y-%m-%d", localtime (&_date_end)); + s << strbuf; + +- DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << s); ++ string r = s.str (); ++ DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << r); + +- return s.str (); ++ return r; + } Added: head/www/sams2/files/patch-src_net.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/sams2/files/patch-src_net.cpp Thu Jul 5 10:31:35 2018 (r473961) @@ -0,0 +1,18 @@ +Fix build with Clang6: stringstream doesn't have a viable overload +for ostream::operator<< . It does with Clang5. Use str() explicitly. + +--- src/net.cpp.orig 2018-07-04 11:24:43 UTC ++++ src/net.cpp +@@ -156,9 +156,10 @@ string Net::asString () + + s << _net.c_str (); + +- DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << s); ++ string r = s.str (); ++ DEBUG (DEBUG8, "[" << this << "->" << __FUNCTION__ << "] = " << r); + +- return s.str (); ++ return r; + } + +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807051031.w65AVaEb057558>