diff --git a/src/fs_sendfile_unsupported.icpp b/src/fs_sendfile_unsupported.icpp index 87af18fd..853c9b99 100644 --- a/src/fs_sendfile_unsupported.icpp +++ b/src/fs_sendfile_unsupported.icpp @@ -15,6 +15,7 @@ */ #include +#include namespace fs { diff --git a/src/xattr.hpp b/src/xattr.hpp index 07f8b03a..98f5c0ec 100644 --- a/src/xattr.hpp +++ b/src/xattr.hpp @@ -18,10 +18,18 @@ #include #endif -#ifndef ENOATTR +#if defined(ENODATA) && !defined(ENOATTR) #define ENOATTR ENODATA #endif +#if defined(ENOATTR) && !defined(ENODATA) +#define ENODATA ENOATTR +#endif + +#if !defined(ENOATTR) && !defined(ENODATA) +#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information" +#endif + #ifndef XATTR_CREATE #define XATTR_CREATE 0x1 #endif