diff --git a/ndk/platforms/android-3/arch-arm/symbols/libc.so.functions.txt b/ndk/platforms/android-3/arch-arm/symbols/libc.so.functions.txt index 814ce1916..4e4b92914 100644 --- a/ndk/platforms/android-3/arch-arm/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-3/arch-arm/symbols/libc.so.functions.txt @@ -241,7 +241,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_tls __sflags diff --git a/ndk/platforms/android-3/include/elf.h b/ndk/platforms/android-3/include/elf.h index 4bc17a63b..cb8ffb77c 100644 --- a/ndk/platforms/android-3/include/elf.h +++ b/ndk/platforms/android-3/include/elf.h @@ -52,6 +52,7 @@ enum { AT_SECURE = 23 }; +#include #include typedef struct { diff --git a/ndk/platforms/android-3/include/errno.h b/ndk/platforms/android-3/include/errno.h index e1b15c04d..b97f6d2e3 100644 --- a/ndk/platforms/android-3/include/errno.h +++ b/ndk/platforms/android-3/include/errno.h @@ -40,16 +40,20 @@ __BEGIN_DECLS #define ENOTSUP EOPNOTSUPP #endif -/* internal function that should *only* be called from system calls */ -/* use errno = xxxx instead in C code */ -extern int __set_errno(int error); - /* internal function returning the address of the thread-specific errno */ extern volatile int* __errno(void); /* a macro expanding to the errno l-value */ #define errno (*__errno()) +/* internal function that should *only* be called from system calls */ +/* use errno = xxxx instead in C code */ +static __inline__ int __attribute__((deprecated)) +__set_errno(int n) { + errno = n; + return -1; +} + __END_DECLS #endif /* _ERRNO_H */ diff --git a/ndk/platforms/android-5/arch-arm/symbols/libc.so.functions.txt b/ndk/platforms/android-5/arch-arm/symbols/libc.so.functions.txt index 960850350..22616d40a 100644 --- a/ndk/platforms/android-5/arch-arm/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-5/arch-arm/symbols/libc.so.functions.txt @@ -273,7 +273,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_tls __sflags diff --git a/ndk/platforms/android-8/arch-arm/symbols/libc.so.functions.txt b/ndk/platforms/android-8/arch-arm/symbols/libc.so.functions.txt index 88dd1b75b..917498f1d 100644 --- a/ndk/platforms/android-8/arch-arm/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-8/arch-arm/symbols/libc.so.functions.txt @@ -284,7 +284,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_tls __setresuid diff --git a/ndk/platforms/android-9/arch-arm/symbols/libc.so.functions.txt b/ndk/platforms/android-9/arch-arm/symbols/libc.so.functions.txt index c1c435821..99eb2d430 100644 --- a/ndk/platforms/android-9/arch-arm/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-9/arch-arm/symbols/libc.so.functions.txt @@ -288,7 +288,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_tls __setresuid diff --git a/ndk/platforms/android-9/arch-mips/symbols/libc.so.functions.txt b/ndk/platforms/android-9/arch-mips/symbols/libc.so.functions.txt index 1c72ae906..b8a95546a 100644 --- a/ndk/platforms/android-9/arch-mips/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-9/arch-mips/symbols/libc.so.functions.txt @@ -159,7 +159,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_thread_area __set_tls diff --git a/ndk/platforms/android-9/arch-x86/symbols/libc.so.functions.txt b/ndk/platforms/android-9/arch-x86/symbols/libc.so.functions.txt index 60772cc79..2c7a608a2 100644 --- a/ndk/platforms/android-9/arch-x86/symbols/libc.so.functions.txt +++ b/ndk/platforms/android-9/arch-x86/symbols/libc.so.functions.txt @@ -155,7 +155,6 @@ __rt_sigaction __rt_sigprocmask __rt_sigtimedwait __sclose -__set_errno __set_syscall_errno __set_thread_area __set_tls