Disable use of accept4 on x86 Android.
On x86 before Linux 4.3, accept4 is not a separate syscall. Instead, it can be called using `socketcall(SYS_ACCEPT4, ...). Rather than implementing that here, just fall back to `accept`.
This commit is contained in:
parent
b631c914cd
commit
695b048aec
1 changed files with 1 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ impl Socket {
|
|||
Ok(Socket(FileDesc::new(fd)))
|
||||
// While the Android kernel supports the syscall,
|
||||
// it is not included in all versions of Android's libc.
|
||||
} else if #[cfg(target_os = "android")] {
|
||||
} else if #[cfg(all(target_os = "android", not(target_arch = "x86")))] {
|
||||
let fd = cvt_r(|| unsafe {
|
||||
libc::syscall(libc::SYS_accept4, self.0.raw(), storage, len, libc::SOCK_CLOEXEC)
|
||||
})?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue