From 9ac20d30b1122bf9b126b9e5dcedb327f064576c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 6 Dec 2005 01:07:27 +0000 Subject: only define offsetof macro if it isnt already defined --- libc/sysdeps/linux/common/getdents.c | 3 ++- libc/sysdeps/linux/common/getdents64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'libc') diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 24ce2c8ba..25b77fe39 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -28,8 +28,9 @@ #include #include -#undef offsetof +#ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif struct kernel_dirent { diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c index a475c948a..d6410262d 100644 --- a/libc/sysdeps/linux/common/getdents64.c +++ b/libc/sysdeps/linux/common/getdents64.c @@ -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 { -- cgit v1.2.3