//go:build !linux package reportbuf import ( "errors" "io/fs" "os" ) // chownFile returns an error on every system but Linux. Giving a // regular file or symbolic link to a user on the open file, never by // name, needs O_PATH and AT_EMPTY_PATH, which only Linux has (see // datadir_linux.go), and prepare-data-dir runs only in the Linux // image. This file lets the package build elsewhere, such as on macOS, // where a developer runs make build and make run. func chownFile(_ *os.Root, name string, _, _ int) error { return &fs.PathError{Op: "chown", Path: name, Err: errors.ErrUnsupported} }