Skip to content

Commit

Permalink
Fix compilation for AIX. Relates to #139
Browse files Browse the repository at this point in the history
  • Loading branch information
creack committed Mar 27, 2022
1 parent 4830ec4 commit bf76305
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ioctl.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows && !solaris
// +build !windows,!solaris
//go:build !windows && !solaris && !aix
// +build !windows,!solaris,!aix

package pty

Expand Down
13 changes: 13 additions & 0 deletions ioctl_unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build aix
// +build aix

package pty

const (
TIOCGWINSZ = 0
TIOCSWINSZ = 0
)

func ioctl(fd, cmd, ptr uintptr) error {
return ErrUnsupported
}
2 changes: 1 addition & 1 deletion start_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ import (
// This will resize the pty to the specified size before starting the command.
// Starts the process in a new session and sets the controlling terminal.
func StartWithSize(cmd *exec.Cmd, ws *Winsize) (*os.File, error) {
return nil, errors.New("unsupported platform")
return nil, ErrUnsupported
}

0 comments on commit bf76305

Please sign in to comment.