xfs
[Top] [All Lists]

[PATCH] dmapi: Fix a build warning

To: xfs@xxxxxxxxxxx
Subject: [PATCH] dmapi: Fix a build warning
From: Alex Elder <aelder@xxxxxxx>
Date: Fri, 12 Feb 2010 14:56:53 -0600
User-agent: Heirloom mailx 12.4 7/29/08
Fix a build warning.

Signed-off-by: Alex Elder <aelder@xxxxxxx>

---
 libdm/getdents.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: dmapi/libdm/getdents.c
===================================================================
--- dmapi.orig/libdm/getdents.c
+++ dmapi/libdm/getdents.c
@@ -72,7 +72,9 @@ extern int __have_no_getdents64;
 # endif
 #endif
 
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#ifndef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif /* ! offsetof */
 
 
 /* For Linux we need a special version of this file since the

<Prev in Thread] Current Thread [Next in Thread>