/* */ #include /* * Since Android ndk r9, __set_errno is deprecated. It is now defined * as inline function in errno.h. The syscall assembly calls * __set_errno, but since libc.so does not export it, the link * fails. To workaround this, replace all occurrences of __set_errno * with a2_set_errno and define it here. */ int a2_set_errno(int n) { errno = n; return -1; }