From c9cd274b2b745f3b3456352d5c5cf006e18f976d Mon Sep 17 00:00:00 2001 From: shiz01 Date: Sun, 22 May 2022 11:12:15 +0700 Subject: [PATCH] Fix build for Gentoo --- src/osd_rmw.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/osd_rmw.cpp b/src/osd_rmw.cpp index 3f8c77fcb..390e6c132 100644 --- a/src/osd_rmw.cpp +++ b/src/osd_rmw.cpp @@ -4,8 +4,26 @@ #include #include #include -#include -#include +extern "C" { +#if defined __has_include + +# if __has_include () +# include +# endif + +// In Gentoo hasn't jerasure directory with header files. +# if __has_include () +# include +# elif __has_include () +# include +# endif + +#else +// default path to headers in Debian +# include +# include +#endif +} #include #include "allocator.h" #include "xor.h"