mirror of
https://github.com/golang/go.git
synced 2025-05-07 16:43:03 +00:00
CL 494915 broke non-blocking I/O on wasip1 for files opened with os.NewFile. This is fixed by providing an implementation of fcntl(F_GETFL) for wasip1. Change-Id: I78979076b95495fd4b94814552e5f5b043270cd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/498195 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Achille Roussel <achille.roussel@gmail.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
14 lines
295 B
Go
14 lines
295 B
Go
// Copyright 2023 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build js && wasm
|
|
|
|
package unix
|
|
|
|
import "syscall"
|
|
|
|
func Fcntl(fd int, cmd int, arg int) (int, error) {
|
|
return 0, syscall.ENOSYS
|
|
}
|