diff --git a/be-files.c b/be-files.c index 02bb1ed5..00d5e883 100644 --- a/be-files.c +++ b/be-files.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "log.h" #include "hash.h" #include "backends.h" @@ -95,11 +96,13 @@ static inline bool dllist_empty(const dllist * thiz) return (thiz->head.next == &thiz->head); } +#if !(defined(offsetof)) #if defined(__GNUC__) && __GNUC__ >= 4 #define offsetof(type, member) __builtin_offsetof(type, member) #else #define offsetof(type, member) ((size_t)&((type*)NULL)->member) #endif +#endif #define dllist_entry_element(ptr, type, member) \ (type*)((char*)(void*)ptr + offsetof(type, member))