Bug 1288644 - Don't define RTLD_NOLOAD when __ANDROID_API__ >= 21. r?glandium
MozReview-Commit-ID: AUEQjIBk50H
--- 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);