Bug 1372781 - Remove getdtablesize stub from android_stub.h. r?jchen draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 07 Jul 2017 16:18:08 +0900
changeset 605227 e960cd41e9d61ad56b7585b86b8bbe4012d43517
parent 605055 20f32734df750bddada9d1edca665c2ea53946f0
child 636420 dba700762c66d71b69a2a7fbb12c5e2216a7475b
push id67330
push userm_kato@ga2.so-net.ne.jp
push dateFri, 07 Jul 2017 07:22:38 +0000
reviewersjchen
bugs1372781, 1346735, 1370138
milestone56.0a1
Bug 1372781 - Remove getdtablesize stub from android_stub.h. r?jchen getdtablesize is unused in nss after landing bug 1346735 and bug 1370138. So it is unnecessary to define this in android_stub.h MozReview-Commit-ID: CHB8xVjgmw3
security/manager/android_stub.h
--- a/security/manager/android_stub.h
+++ b/security/manager/android_stub.h
@@ -17,28 +17,15 @@
 #include <linux/kernel.h>
 #include <unistd.h>
 
 #ifndef ANDROID_VERSION
 #include <android/api-level.h>
 #define ANDROID_VERSION __ANDROID_API__
 #endif
 
-/* Use this stub version of getdtablesize
- * instead of the one in the header */
-__attribute__((unused))
-static int getdtablesize_stub(void)
-{
-    struct rlimit r;
-    if (getrlimit(RLIMIT_NOFILE, &r) < 0) {
-        return sysconf(_SC_OPEN_MAX);
-    }
-    return r.rlim_cur;
-}
-#define getdtablesize() getdtablesize_stub()
-
 #if ANDROID_VERSION < 21
 #define RTLD_NOLOAD 0
 #endif
 
 #define sysinfo(foo) -1
 
 #endif /* ANDROID_STUB_H */