Fix ndk_cruft.cpp __getdents64 build failure.
Change-Id: Ia463113da0575b36b5a9935d8d45e7bd2c801357
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index b0adf26..b73c47e 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -30,6 +30,7 @@
#if !defined(__LP64__)
#include <ctype.h>
+#include <dirent.h>
#include <inttypes.h>
#include <pthread.h>
#include <signal.h>
@@ -239,7 +240,8 @@
}
// This is a system call that was never in POSIX. Use readdir(3) instead.
-extern "C" int getdents(unsigned int fd, struct dirent* dirp, unsigned int count) {
+extern "C" int __getdents64(unsigned int, dirent*, unsigned int);
+extern "C" int getdents(unsigned int fd, dirent* dirp, unsigned int count) {
return __getdents64(fd, dirp, count);
}