Skip to content

Commit 48b09d1

Browse files
committed
binary_writer.cpp: fix compatibility with boost-1.71.0
With newer boost 1.71.0 with: boostorg/endian@6b57926#diff-5a08a00b5b1ec741b8b13cf3c1396874 boost/endian/conversion.hpp isn't included by boost/endian/buffers.hpp and the build fails with: src/anbox/common/binary_writer.cpp: In member function 'void anbox::common::BinaryWriter::write_uint16(uint16_t)': src/anbox/common/binary_writer.cpp:52:24: error: 'native_to_big' is not a member of 'boost::endian' 52 | v = boost::endian::native_to_big(value); | ^~~~~~~~~~~~~ src/anbox/common/binary_writer.cpp:55:24: error: 'native_to_little' is not a member of 'boost::endian' 55 | v = boost::endian::native_to_little(value); | ^~~~~~~~~~~~~~~~ src/anbox/common/binary_writer.cpp: In member function 'void anbox::common::BinaryWriter::write_uint32(uint32_t)': src/anbox/common/binary_writer.cpp:72:24: error: 'native_to_big' is not a member of 'boost::endian' 72 | v = boost::endian::native_to_big(value); | ^~~~~~~~~~~~~ src/anbox/common/binary_writer.cpp:75:24: error: 'native_to_little' is not a member of 'boost::endian' 75 | v = boost::endian::native_to_little(value); | ^~~~~~~~~~~~~~~~ Signed-off-by: Martin Jansa <[email protected]>
1 parent bdfda8c commit 48b09d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/anbox/common/binary_writer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <stdexcept>
2323

2424
#include <boost/endian/buffers.hpp>
25+
#include <boost/endian/conversion.hpp>
2526

2627
namespace {
2728
bool is_little_endian() {

0 commit comments

Comments
 (0)