Skip to content

Commit

Permalink
cmd/samterm: Update Mkfifo calls to use unix package
Browse files Browse the repository at this point in the history
The samterm code calls syscall.Mkfifo in two places.  When compiling on
AIX, this results in a compilation error:

$ go install
./unix.go:25:17: undefined: syscall.Mkfifo
./unix.go:36:22: undefined: syscall.Mkfifo

This is because the Mkfifo call is not implemented for AIX in the syscall
package.  However, Mkfifo is available in the unix package, which is
already imported in cmd/samterm/unix.go.  This change uses the Mkfifo from
unix instead of syscall.

Fixes 9fans#123
  • Loading branch information
bhuntsman committed Feb 17, 2025
1 parent 510f6a0 commit a905f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/samterm/unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func extstart() {
} else {
exname = fmt.Sprintf("/tmp/.sam.%s", user)
}
err := syscall.Mkfifo(exname, 0600)
err := unix.Mkfifo(exname, 0600)
if err != nil {
if !os.IsExist(err) {
return
Expand All @@ -33,7 +33,7 @@ func extstart() {
}
if st.Mode()&fs.ModeNamedPipe == 0 {
removeextern()
if err := syscall.Mkfifo(exname, 0600); err != nil {
if err := unix.Mkfifo(exname, 0600); err != nil {
return
}
}
Expand Down

0 comments on commit a905f31

Please sign in to comment.