ports/www/sams2/files/patch-src_net.cpp
Adriaan de Groot e9488668b0 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
2018-07-05 10:31:35 +00:00

18 lines
478 B
C++

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;
}