aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-03-22 19:12:52 -0700
committerElliott Hughes <enh@google.com>2013-03-22 19:12:52 -0700
commit3198850ea125f746efabd1a81e3bd7cfa58cc600 (patch)
tree9f4a7d3ceab065e7169ec824cbe7249e1c6f6667
parentc019345a3a0f3ee8561e595917b75d6419ee4cc8 (diff)
downloadandroid_bionic-3198850ea125f746efabd1a81e3bd7cfa58cc600.tar.gz
android_bionic-3198850ea125f746efabd1a81e3bd7cfa58cc600.tar.bz2
android_bionic-3198850ea125f746efabd1a81e3bd7cfa58cc600.zip
Unhide __set_errno for backwards compatibility.
This was in <errno.h>, and people called it :-( Change-Id: I038490be77eb9372b3f31305ec580fa7b09c983e
-rw-r--r--libc/bionic/__set_errno.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/bionic/__set_errno.cpp b/libc/bionic/__set_errno.cpp
index 4e72093b7..af6a68eb1 100644
--- a/libc/bionic/__set_errno.cpp
+++ b/libc/bionic/__set_errno.cpp
@@ -31,7 +31,8 @@
// This function is called from our assembler syscall stubs.
// C/C++ code should just assign 'errno' instead.
-extern "C" __LIBC_HIDDEN__ int __set_errno(int n) {
+// TODO: this should be __LIBC_HIDDEN__ but was exposed in <errno.h> in the NDK.
+extern "C" int __set_errno(int n) {
errno = n;
return -1;
}