readline icon indicating copy to clipboard operation
readline copied to clipboard

Perform ioctl system calls through x/sys/unix

Open jrick opened this issue 10 months ago • 4 comments

OpenBSD is removing the syscall(2) interface soon and ioctl operations using syscall.Syscall6 will fail to link at runtime:

$ go test
tmpdir: /tmp
readline.test:/tmp/go-build2875288623/b001/readline.test: undefined symbol 'syscall' ld.so: readline.test: lazy binding failed!
signal: killed
FAIL	github.com/chzyer/readline	0.008s

These calls must instead be performed using the golang.org/x/sys/unix package, which links to the ioctl(2) libc stub instead of the generic syscall(2) interface.

jrick avatar Oct 24 '23 20:10 jrick

@slingamn something for https://github.com/ergochat/readline?

wader avatar Oct 24 '23 22:10 wader

@wader @slingamn that fork works correctly already.

jrick avatar Oct 25 '23 00:10 jrick

@jrick 👍 aha great, was fixed in some other way? code seems quite different

wader avatar Oct 25 '23 09:10 wader

it already performs ioctls through a recent enough version of golang.org/x/sys/unix

jrick avatar Oct 25 '23 13:10 jrick