Revert "Revert "Remove remaining ndk_cruft from LP64 platforms""
This reverts commit 23af25b747b5e7b0ca513a87b32f1f6a3cb99698.
Bug: http://b/26164862
Change-Id: I201bf49530f33f8ba6a1a35b79723afb9e84c7a5
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index 0429430..4bbb2c1 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -49,11 +49,8 @@
extern "C" {
-// Brillo doesn't need to support any legacy cruft.
-#if !defined(__BRILLO__)
-
-// Most of the cruft is only for 32-bit Android targets.
-#if !defined(__LP64__)
+// Brillo and LP64 don't need to support any legacy cruft.
+#if !defined(__BRILLO__) && !defined(__LP64__)
// These were accidentally declared in <unistd.h> because we stupidly used to inline
// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
@@ -367,8 +364,6 @@
return __set_errno_internal(n);
}
-#endif // !defined(__LP64__)
-
// This was never implemented in bionic, only needed for ABI compatibility with the NDK.
// In the M time frame, over 1000 apps have a reference to this!
void endpwent() { }
@@ -392,6 +387,6 @@
}
#endif
-#endif // !defined(__BRILLO__)
+#endif // !defined(__BRILLO__) && !defined (__LP64__)
} // extern "C"