From 06251aa76f5cff9a546107432d959e09a7a93f29 Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Fri, 1 Dec 2023 05:46:06 +0000 Subject: [PATCH] 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 ` 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. --- src/ripple/app/misc/detail/Work.h | 4 ++++ src/ripple/beast/rfc2616.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/ripple/app/misc/detail/Work.h b/src/ripple/app/misc/detail/Work.h index 15be569566e..afd49adf326 100644 --- a/src/ripple/app/misc/detail/Work.h +++ b/src/ripple/app/misc/detail/Work.h @@ -20,6 +20,10 @@ #ifndef RIPPLE_APP_MISC_DETAIL_WORK_H_INCLUDED #define RIPPLE_APP_MISC_DETAIL_WORK_H_INCLUDED +// TODO: This include is a workaround for beast compilation bug. +// Remove when fix https://github.com/boostorg/beast/pull/2682/ is available. +#include + #include #include diff --git a/src/ripple/beast/rfc2616.h b/src/ripple/beast/rfc2616.h index 5aff5526a89..7f96e924eb5 100644 --- a/src/ripple/beast/rfc2616.h +++ b/src/ripple/beast/rfc2616.h @@ -20,11 +20,16 @@ #ifndef BEAST_RFC2616_HPP #define BEAST_RFC2616_HPP +// TODO: This include is a workaround for beast compilation bug. +// Remove when fix https://github.com/boostorg/beast/pull/2682/ is available. +#include + #include #include #include #include #include + #include #include #include