You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function unix.IoctlSetPointerInt should be available on all supported UNIX like systems.
I've been contributing to the Elvish shell project and recently attempted to replace it's custom Ioctl() function (because it had no unit tests) with functionality provided by golang.org/x/sys. However, one of the ioctl's Elvish uses is unix.TIOCSPGRP which requires using unix.IoctlSetPointerInt(). That transformation works fine on Linux but fails to build on macOS and FreeBSD with "undefined: unix.IoctlSetPointerInt". This is because unix.IoctlSetPointerInt is only implemented in syscall_linux.go. -- something that is not obvious from looking at the public documentation. I can't see any reason why this particular function can't be implemented generically for every UNIX like OS.
The text was updated successfully, but these errors were encountered:
Function
unix.IoctlSetPointerInt
should be available on all supported UNIX like systems.I've been contributing to the Elvish shell project and recently attempted to replace it's custom
Ioctl()
function (because it had no unit tests) with functionality provided by golang.org/x/sys. However, one of the ioctl's Elvish uses isunix.TIOCSPGRP
which requires usingunix.IoctlSetPointerInt()
. That transformation works fine on Linux but fails to build on macOS and FreeBSD with "undefined: unix.IoctlSetPointerInt". This is becauseunix.IoctlSetPointerInt
is only implemented in syscall_linux.go. -- something that is not obvious from looking at the public documentation. I can't see any reason why this particular function can't be implemented generically for every UNIX like OS.The text was updated successfully, but these errors were encountered: