svn commit: trunk/uClibc/libc/sysdeps/linux/common

vapier at uclibc.org vapier at uclibc.org
Tue Dec 6 01:07:42 UTC 2005


Author: vapier
Date: 2005-12-05 17:07:27 -0800 (Mon, 05 Dec 2005)
New Revision: 12667

Log:
only define offsetof macro if it isnt already defined

Modified:
   trunk/uClibc/libc/sysdeps/linux/common/getdents.c
   trunk/uClibc/libc/sysdeps/linux/common/getdents64.c


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/getdents.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/getdents.c	2005-12-06 01:03:20 UTC (rev 12666)
+++ trunk/uClibc/libc/sysdeps/linux/common/getdents.c	2005-12-06 01:07:27 UTC (rev 12667)
@@ -28,8 +28,9 @@
 #include <sys/types.h>
 #include <sys/syscall.h>
 
-#undef offsetof
+#ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
 
 struct kernel_dirent
 {

Modified: trunk/uClibc/libc/sysdeps/linux/common/getdents64.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/getdents64.c	2005-12-06 01:03:20 UTC (rev 12666)
+++ trunk/uClibc/libc/sysdeps/linux/common/getdents64.c	2005-12-06 01:07:27 UTC (rev 12667)
@@ -31,8 +31,9 @@
 
 #if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 
 
-#undef offsetof
+#ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
 
 struct kernel_dirent64 
 {




More information about the uClibc-cvs mailing list