summaryrefslogtreecommitdiffstats
path: root/package/moarvm/moarvm.hash
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2017-02-25 22:17:01 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-02-26 14:14:30 +0100
commit021f95a2a43b9d3e765856ab9eb5e8d5af5a3dcd (patch)
tree475c4912bebff59c3412727d2a41f87320802bcc /package/moarvm/moarvm.hash
parenta384ce7d4b8485460d342ee54cfee491fc11a5a4 (diff)
downloadbuildroot-021f95a2a43b9d3e765856ab9eb5e8d5af5a3dcd.tar.gz
buildroot-021f95a2a43b9d3e765856ab9eb5e8d5af5a3dcd.zip
synergy: Fix build with gcc 6
Fixes: http://autobuild.buildroot.net/results/05b/05bbc22dd6cd5564462226e612ab1e95778fe935/ http://autobuild.buildroot.net/results/edf/edfe58749d1b7a1bb2e0184a6824a74b9d38ddb9/ http://autobuild.buildroot.net/results/139/1395eca13ca537bde928ddd68a5bc6e130e82ba3/ http://autobuild.buildroot.net/results/94a/94ad6e8bbbeb926ea834d9d6e3ba87d0398acb86/ Gcc 6.x defaults to C++14, and the iostream operator bool behaviour changed in C++11. In previous versions, a somewhat odd operator void* was used to return the status of the stream as a pointer. Since C++11 a more sensible operator bool is used to return the stream staus. For details, see: http://en.cppreference.com/w/cpp/io/basic_ios/operator_bool The code in CConfigReadContext assumes the pre-C++11 behaviour and provides its own operator void overload to return the status of the embedded iostream. With C++11, iostream no longer provides this overload, breaking the build: CConfig.cpp: In member function 'CConfigReadContext::operator void*() const': CConfig.cpp:1851:9: error: cannot convert 'std::istream {aka std::basic_istream<char>}' to 'void*' in return return m_stream; To fix it, backport part of upstream commit 3d963bfbe7897d0a33ad (possible fix for mavericks) which changes the code to simply provide a getStream() method which returns a reference to the embedded stream and the calling code is changed to use operator bool on the returned stream, making the code compatible with both old and new compilers. This upstream commit is part of the 1.6.0 release, so can be dropped when the version is bumped. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/moarvm/moarvm.hash')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud