File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 8282# include < sys/personality.h>
8383# endif
8484
85+ # if SANITIZER_ANDROID && __ANDROID_API__ < 35
86+ // The weak strerrorname_np definition allows to check for the API level at runtime.
87+ extern " C" SANITIZER_WEAK_ATTRIBUTE const char * strerrorname_np (int );
88+ # endif
89+
8590# if SANITIZER_LINUX && defined(__loongarch__)
8691# include < sys/sysmacros.h>
8792# endif
@@ -1214,6 +1219,12 @@ uptr GetPageSize() {
12141219 CHECK_EQ (rv, 0 );
12151220 return (uptr)pz;
12161221# elif SANITIZER_USE_GETAUXVAL
1222+
1223+ # if SANITIZER_ANDROID && __ANDROID_API__ < 35
1224+ if (!strerrorname_np)
1225+ return 4096 ;
1226+ # endif
1227+
12171228 return getauxval (AT_PAGESZ);
12181229# else
12191230 return sysconf (_SC_PAGESIZE); // EXEC_PAGESIZE may not be trustworthy.
You can’t perform that action at this time.
0 commit comments