Bug 1288644 - Don't define RTLD_NOLOAD when __ANDROID_API__ >= 21. r?glandium draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 22 Jul 2016 16:40:21 +0900
changeset 393214 56e84ad600b55145b6f5d7ad480935bc31df47d8
parent 393192 78dd94ba93c77d0bba45f8e4525947629a305a41
child 526536 869d873d1a8e42d8704df07f93d0998c60244d81
push id24259
push userm_kato@ga2.so-net.ne.jp
push dateWed, 27 Jul 2016 09:36:15 +0000
reviewersglandium
bugs1288644
milestone50.0a1
Bug 1288644 - Don't define RTLD_NOLOAD when __ANDROID_API__ >= 21. r?glandium MozReview-Commit-ID: AUEQjIBk50H
security/manager/android_stub.h
--- a/security/manager/android_stub.h
+++ b/security/manager/android_stub.h
@@ -12,16 +12,21 @@
  * we may be able to implement it ourselves. */
 #define _SYS_SYSINFO_H_
 
 #include <sys/cdefs.h>
 #include <sys/resource.h>
 #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);