Skip to content

Commit

Permalink
Fix the build on aix
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Apr 22, 2022
1 parent 69fcbcb commit 6b46741
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions internal/filewatcher/term_aix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build aix
// +build aix

package filewatcher

import "golang.org/x/sys/unix"

const tcGet = unix.TCGETA
const tcSet = unix.TCSETA
1 change: 1 addition & 0 deletions internal/filewatcher/term_bsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbsd

package filewatcher
Expand Down
4 changes: 2 additions & 2 deletions internal/filewatcher/term_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build !windows && !aix
// +build !windows,!aix

package filewatcher

Expand Down
3 changes: 3 additions & 0 deletions internal/filewatcher/watch.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !aix
// +build !aix

package filewatcher

import (
Expand Down
18 changes: 18 additions & 0 deletions internal/filewatcher/watch_unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//go:build aix
// +build aix

package filewatcher

import (
"fmt"
"runtime"
)

type Event struct {
PkgPath string
Debug bool
}

func Watch(dirs []string, run func(Event) error) error {
return fmt.Errorf("file watching is not supported on %v/%v", runtime.GOOS, runtime.GOARCH)
}

0 comments on commit 6b46741

Please sign in to comment.