Revert "Remove remaining ndk_cruft from LP64 platforms"

This reverts commit b1d0a2ae7790f882d8f1ab24d7ef15e2b90c8ca2.

Change-Id: I1da06be0b78a4f2a4cad7e4a19a3ee755f55a813
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index 4bbb2c1..0429430 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -49,8 +49,11 @@
 
 extern "C" {
 
-// Brillo and LP64 don't need to support any legacy cruft.
-#if !defined(__BRILLO__) && !defined(__LP64__)
+// 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__)
 
 // These were accidentally declared in <unistd.h> because we stupidly used to inline
 // getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
@@ -364,6 +367,8 @@
   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() { }
@@ -387,6 +392,6 @@
 }
 #endif
 
-#endif // !defined(__BRILLO__) && !defined (__LP64__)
+#endif // !defined(__BRILLO__)
 
 } // extern "C"