From 287c2c72afeb8fbf017cd62cc100b2d05dca0fae Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 14 Oct 2023 08:48:15 -0400 Subject: dir: Fix Android build Android doesn't provide a getdents() wrapper, so use the syscall. --- src/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dir.c b/src/dir.c index 0304674..a7423e9 100644 --- a/src/dir.c +++ b/src/dir.c @@ -24,7 +24,7 @@ static ssize_t bfs_getdents(int fd, void *buf, size_t size) { sanitize_uninit(buf, size); -#if __linux__ && __GLIBC__ && !__GLIBC_PREREQ(2, 30) +#if (__linux__ && __GLIBC__ && !__GLIBC_PREREQ(2, 30)) || __ANDROID__ ssize_t ret = syscall(SYS_getdents64, fd, buf, size); #elif __linux__ ssize_t ret = getdents64(fd, buf, size); -- cgit v1.2.3