Skip to content

Commit

Permalink
net: do not use sendfile on iOS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cherrymui committed Dec 1, 2021
1 parent ab79055 commit 029dfbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/net/sendfile_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/net/sendfile_unix_alt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 029dfbc

Please sign in to comment.