Replace local MUSL define with global ANDROID_HOST_MUSL
Bug: 190084016
Test: m USE_HOST_MUSL=true bionic-unit-tests-glibc
Change-Id: I56b23576cb24912112d2ae56d8ecc2e3716982fe
diff --git a/tests/dirent_test.cpp b/tests/dirent_test.cpp
index 1155a4e..3ea9cbd 100644
--- a/tests/dirent_test.cpp
+++ b/tests/dirent_test.cpp
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <sys/cdefs.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@@ -82,7 +83,7 @@
}
TEST(dirent, scandirat_scandirat64) {
-#if !defined(MUSL)
+#if !defined(ANDROID_HOST_MUSL)
// Get everything from /proc/self...
dirent** entries;
int entry_count = scandir("/proc/self", &entries, nullptr, alphasort);
@@ -144,7 +145,7 @@
}
TEST(dirent, scandirat_ENOENT) {
-#if !defined(MUSL)
+#if !defined(ANDROID_HOST_MUSL)
int root_fd = open("/", O_DIRECTORY | O_RDONLY);
ASSERT_NE(-1, root_fd);
dirent** entries;
@@ -158,7 +159,7 @@
}
TEST(dirent, scandirat64_ENOENT) {
-#if !defined(MUSL)
+#if !defined(ANDROID_HOST_MUSL)
int root_fd = open("/", O_DIRECTORY | O_RDONLY);
ASSERT_NE(-1, root_fd);
dirent64** entries;