Move __set_errno to ndk_cruft.cpp.
Change-Id: I5caa1cc161961d2e4629429c0d406875b93cdbd0
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index 231cf10..d6b8e8f 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -357,6 +357,12 @@
return __real_get_thread();
}
+// This one exists only for the LP32 NDK and is not present anywhere else.
+extern "C" long __set_errno_internal(int);
+extern "C" long __set_errno(int n) {
+ return __set_errno_internal(n);
+}
+
#endif // !defined(__LP64__)
// This was never implemented in bionic, only needed for ABI compatibility with the NDK.