From a82280f235c4e55b3a9221cb7bc78b08465f1f50 Mon Sep 17 00:00:00 2001 From: void!yura Date: Mon, 17 Jan 2005 11:46:32 +0000 Subject: [PATCH] offsetof already defined in stddef.h in gcc4, so add check to prevent redefinition. (Logical change 1.658) --- include/ntfs/support.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ntfs/support.h b/include/ntfs/support.h index ade65e08..b02390bf 100644 --- a/include/ntfs/support.h +++ b/include/ntfs/support.h @@ -49,7 +49,9 @@ /* * Useful macro for determining the offset of a struct member. */ +#ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif /* * Simple bit operation macros. NOTE: These are NOT atomic.