From 029dfbcc83123cb62e52f2aaedc46397815e3fa6 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Tue, 30 Nov 2021 17:30:57 -0500 Subject: [PATCH] net: do not use sendfile on iOS 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 Reviewed-by: Emmanuel Odeke Reviewed-by: Michael Knyszek Reviewed-by: Changkun Ou Reviewed-by: Roland Shoemaker --- src/net/sendfile_stub.go | 2 +- src/net/sendfile_unix_alt.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sendfile_stub.go b/src/net/sendfile_stub.go index 4ddae852e1..7428da3127 100644 --- a/src/net/sendfile_stub.go +++ b/src/net/sendfile_stub.go @@ -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 diff --git a/src/net/sendfile_unix_alt.go b/src/net/sendfile_unix_alt.go index 8845a981f5..f99af92bc8 100644 --- a/src/net/sendfile_unix_alt.go +++ b/src/net/sendfile_unix_alt.go @@ -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 -- 2.50.0