Workarounds for gcc-13 compatibility (#4817)

Workaround for compilation errors with gcc-13 and other compilers
relying on `libstdc++` version 13. This is temporary until actual fix is
available for us to use: https://github.com/boostorg/beast/pull/2682

Some boost.beast files (which we do use) rely on an old gcc-12 behaviour
where `#include <cstdint>` was not needed even though types from this
header were used. This was broken by a change in libstdc++ version 13:
https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

The necessary fix was implemented in boost.beast, however it is not yet
available. Until it is available, we can use this workaround to enable
compilation of `rippled` with gcc-13, clang-16, etc.
This commit is contained in:
Bronek Kozicki
2023-12-01 05:46:06 +00:00
committed by GitHub
parent 5aef102f4f
commit 06251aa76f
2 changed files with 9 additions and 0 deletions

View File

@@ -20,6 +20,10 @@
#ifndef RIPPLE_APP_MISC_DETAIL_WORK_H_INCLUDED
#define RIPPLE_APP_MISC_DETAIL_WORK_H_INCLUDED
// TODO: This include <cstdint> is a workaround for beast compilation bug.
// Remove when fix https://github.com/boostorg/beast/pull/2682/ is available.
#include <cstdint>
#include <boost/beast/http/message.hpp>
#include <boost/beast/http/string_body.hpp>

View File

@@ -20,11 +20,16 @@
#ifndef BEAST_RFC2616_HPP
#define BEAST_RFC2616_HPP
// TODO: This include <cstdint> is a workaround for beast compilation bug.
// Remove when fix https://github.com/boostorg/beast/pull/2682/ is available.
#include <cstdint>
#include <boost/beast/http/message.hpp>
#include <boost/beast/http/rfc7230.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/utility/string_ref.hpp>
#include <algorithm>
#include <cctype>
#include <iterator>