]> Cypherpunks.ru repositories - gostls13.git/commit
syscall: on linux use accept4 in Accept, fall back to accept
authorTobias Klauser <tklauser@distanz.ch>
Mon, 26 Apr 2021 22:11:00 +0000 (00:11 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Mon, 26 Apr 2021 23:06:45 +0000 (23:06 +0000)
commit903b25178e51fa96d37a91b020747ce236ba04f0
tree1d614b29c907fe7404ac5ffa7ca9a59178cce7e4
parentbe28caf0aa1649c4422f64e687a388a027686e6e
syscall: on linux use accept4 in Accept, fall back to accept

Android seems to block the accept syscall in newer versions. Use accept4
instead on kernel versions that support it (Linux 2.6.28 and newer) and
fall back to accept on ENOSYS.

Fixes #45767

Change-Id: If190ace0e0213207fdaf6eeb79a5543ef18456de
Reviewed-on: https://go-review.googlesource.com/c/go/+/313769
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/syscall/syscall_linux.go