converge/cmd/tcpserver/sshserver_linux.go
Erik Brakkee 2f40f86294 cross compilation on windows working.
pty.Start() is not supported on windows
2024-09-08 11:16:48 +02:00

13 lines
253 B
Go

package main
import (
"os"
"syscall"
"unsafe"
)
func setWinsize(f *os.File, w, h int) {
syscall.Syscall(syscall.SYS_IOCTL, f.Fd(), uintptr(syscall.TIOCSWINSZ),
uintptr(unsafe.Pointer(&struct{ h, w, x, y uint16 }{uint16(h), uint16(w), 0, 0})))
}