Bug 1372781 - Remove getdtablesize stub from android_stub.h. r=jchen
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 07 Jul 2017 16:18:08 +0900
changeset 416564 92c802e4c9cf6253d44b0fcb410e7ed063dd5759
parent 416563 7cb5f70b086d886007b2022da83c3056b9e5d311
child 416565 a7bc534c0604d7f0134db1ffab6e5a5972fad87d
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1372781, 1346735, 1370138
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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 */