--- libgo/go/os/file_unix.go.orig 2020-03-04 19:30:03.000000000 +1100 +++ libgo/go/os/file_unix.go 2020-09-08 10:29:14.563442000 +1000 @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris +// +build aix bsdsunix darwin dragonfly freebsd linux nacl netbsd openbsd solaris package os @@ -109,8 +109,9 @@ // Don't try to use kqueue with regular files on FreeBSD. // It crashes the system unpredictably while running all.bash. // Issue 19093. - if runtime.GOOS == "freebsd" && kind == kindOpenFile { - kind = kindNewFile + if (runtime.GOOS == "bsdsunix" || runtime.GOOS == "freebsd") + && kind == kindOpenFile { + kind = kindNewFile } pollable := kind == kindOpenFile || kind == kindPipe