Skip to content

Commit a905f31

Browse files
committed
cmd/samterm: Update Mkfifo calls to use unix package
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
1 parent 510f6a0 commit a905f31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/samterm/unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func extstart() {
2222
} else {
2323
exname = fmt.Sprintf("/tmp/.sam.%s", user)
2424
}
25-
err := syscall.Mkfifo(exname, 0600)
25+
err := unix.Mkfifo(exname, 0600)
2626
if err != nil {
2727
if !os.IsExist(err) {
2828
return
@@ -33,7 +33,7 @@ func extstart() {
3333
}
3434
if st.Mode()&fs.ModeNamedPipe == 0 {
3535
removeextern()
36-
if err := syscall.Mkfifo(exname, 0600); err != nil {
36+
if err := unix.Mkfifo(exname, 0600); err != nil {
3737
return
3838
}
3939
}

0 commit comments

Comments
 (0)