Deprecate readdir_r.
I've been campaigning against readdir_r for years:
http://elliotth.blogspot.com/2012/10/how-not-to-use-readdirr3.html
and glibc deprecated it in 2.24, so we should join the club.
Bug: http://b/32678321
Test: builds
Change-Id: Ie3887ed75989aced9324266aa3b93e85c11bdbc9
diff --git a/libc/include/dirent.h b/libc/include/dirent.h
index 7ac4ab7..d6819f2 100644
--- a/libc/include/dirent.h
+++ b/libc/include/dirent.h
@@ -80,8 +80,8 @@
DIR* fdopendir(int __dir_fd);
struct dirent* readdir(DIR* __dir);
struct dirent64* readdir64(DIR* __dir) __INTRODUCED_IN(21);
-int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer);
-int readdir64_r(DIR* __dir, struct dirent64* __entry, struct dirent64** __buffer) __INTRODUCED_IN(21);
+int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer) __attribute__((__deprecated__("readdir_r is deprecated; use readdir instead")));
+int readdir64_r(DIR* __dir, struct dirent64* __entry, struct dirent64** __buffer) __INTRODUCED_IN(21) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));
int closedir(DIR* __dir);
void rewinddir(DIR* __dir);
void seekdir(DIR* __dir, long __location) __INTRODUCED_IN(23);