]> Cypherpunks repositories - gostls13.git/commitdiff
internal/syscall/unix: add build constraint to nonblocking_js.go
authorDmitri Shuralyov <dmitri@shuralyov.com>
Wed, 27 Jun 2018 19:37:19 +0000 (15:37 -0400)
committerDmitri Shuralyov <dmitri@shuralyov.com>
Thu, 28 Jun 2018 03:12:01 +0000 (03:12 +0000)
The intention was for this file to be constrained to both js and wasm,
but the build constraint was missing, causing it to be constrained only
to js because of the _js suffix in the filename.

Add a js,wasm build constraint. The js part is redundant, but specified
anyway to make it more visible and consistent with other similar files.

This issue was spotted while working on GopherJS, because it was causing
a conflict there (both nonblocking.go and nonblocking_js.go files were
being matched).

Change-Id: Ifc6843269e1108fe61b1723be25a12254e806fd4
Reviewed-on: https://go-review.googlesource.com/121275
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/internal/syscall/unix/nonblocking_js.go

index ff67c75e81a020463f5d85300f819135213957dc..a360b53c3dbfac3f89b1da05465bf8e481d0c2d1 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build js,wasm
+
 package unix
 
 func IsNonblock(fd int) (nonblocking bool, err error) {