浏览代码

Kill 2 redefine warnings w/ gcc-4.x

Peter S. Mazinger 20 年之前
父节点
当前提交
ab793b00a8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      libc/sysdeps/linux/common/getdents.c
  2. 1 1
      libc/sysdeps/linux/common/getdents64.c

+ 1 - 1
libc/sysdeps/linux/common/getdents.c

@@ -28,7 +28,7 @@
 #include <sys/types.h>
 #include <sys/syscall.h>
 
-
+#undef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 
 struct kernel_dirent

+ 1 - 1
libc/sysdeps/linux/common/getdents64.c

@@ -31,7 +31,7 @@
 
 #if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 
 
-
+#undef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 
 struct kernel_dirent64