Skip to content

Commit bf76305

Browse files
committed
Fix compilation for AIX. Relates to #139
1 parent 4830ec4 commit bf76305

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

ioctl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build !windows && !solaris
2-
// +build !windows,!solaris
1+
//go:build !windows && !solaris && !aix
2+
// +build !windows,!solaris,!aix
33

44
package pty
55

ioctl_unsupported.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//go:build aix
2+
// +build aix
3+
4+
package pty
5+
6+
const (
7+
TIOCGWINSZ = 0
8+
TIOCSWINSZ = 0
9+
)
10+
11+
func ioctl(fd, cmd, ptr uintptr) error {
12+
return ErrUnsupported
13+
}

start_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ import (
1616
// This will resize the pty to the specified size before starting the command.
1717
// Starts the process in a new session and sets the controlling terminal.
1818
func StartWithSize(cmd *exec.Cmd, ws *Winsize) (*os.File, error) {
19-
return nil, errors.New("unsupported platform")
19+
return nil, ErrUnsupported
2020
}

0 commit comments

Comments
 (0)