]> Cypherpunks repositories - gostls13.git/commitdiff
net: do not use sendfile on iOS
authorCherry Mui <cherryyz@google.com>
Tue, 30 Nov 2021 22:30:57 +0000 (17:30 -0500)
committerCherry Mui <cherryyz@google.com>
Wed, 1 Dec 2021 15:58:46 +0000 (15:58 +0000)
Apparently, on the iOS builder sendfile causes a SIGSYS signal
(instead of returning ENOSYS). Disabling it for now so we can
make progress on iOS. We can revisit if sendfile is actually
broken on iOS and whether it is beneficial.

Updates #49616.

Change-Id: I3883fad0ce35e3f0aa352301eb499a1afa0225a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/368054
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Changkun Ou <mail@changkun.de>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/net/sendfile_stub.go
src/net/sendfile_unix_alt.go

index 4ddae852e174bc1cc8d9488234ab34854cd490b1..7428da3127b10b22a763eb65b8b928fe56145c64 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build aix || (js && wasm) || netbsd || openbsd
+//go:build aix || (js && wasm) || netbsd || openbsd || ios
 
 package net
 
index 8845a981f58baf6b86e1e47e3605076cbaa72e9e..f99af92bc80b6211747ddc92e75859340380f724 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build darwin || dragonfly || freebsd || solaris
+//go:build (darwin && !ios) || dragonfly || freebsd || solaris
 
 package net