// allocated size.
EXPECT_TRUE(__asan_get_ownership(zero_alloc));
// Allocated size is 0 or 1 depending on the allocator used.
- EXPECT_LT(__asan_get_allocated_size(zero_alloc), 2);
+ EXPECT_LT(__asan_get_allocated_size(zero_alloc), 2U);
}
free(zero_alloc);
}
CallMemTransferByPointer(&memmove);
}
-#if defined(__linux__) && !defined(ANDROID)
+#if defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
#define READ_TEST(READ_N_BYTES) \
char *x = new char[10]; \
int fd = open("/proc/self/stat", O_RDONLY); \
TEST(AddressSanitizer, read) {
READ_TEST(read(fd, x, 15));
}
-#endif // defined(__linux__) && !defined(ANDROID)
+#endif // defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
// This test case fails
// Clang optimizes memcpy/memset calls which lead to unaligned access