From 7b495396fbf7bf604939d8150955ce891f7e8ccd Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Fri, 1 Jan 2016 19:49:25 +0900 Subject: __ARCH_HAS_DEPRECATED_SYSCALLS__ case fix. getdents is deprecated. Signed-off-by: Yoshinori Sato --- libc/sysdeps/linux/common/getdents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index b65524eee..8f371eba4 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -91,7 +91,7 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) const size_t size_diff = (offsetof (struct dirent, d_name) - offsetof (struct kernel_dirent, d_name)); -# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__ +# ifndef __ARCH_HAS_DEPRECATED_SYSCALLS__ red_nbytes = MIN (nbytes - ((nbytes / (offsetof (struct dirent, d_name) + 14)) * size_diff), nbytes - size_diff); -- cgit v1.2.3