Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform ioctl system calls through x/sys/unix #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrick
Copy link

@jrick jrick commented Oct 24, 2023

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.

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.
@wader
Copy link

wader commented Oct 24, 2023

@jrick
Copy link
Author

jrick commented Oct 25, 2023

@wader @slingamn that fork works correctly already.

@wader
Copy link

wader commented Oct 25, 2023

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

@jrick
Copy link
Author

jrick commented Oct 25, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants