Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ptsname() for big-endian architectures
On big-endian architectures unix.IoctlGetInt() leads to a wrong result because a 32 bit value is stored into a 64 bit buffer. When dereferencing the result is left shifted by 32. Without this patch ptsname() returns a wrong path from the second pty onwards. To protect syscalls against re-arranging by the GC the conversion from unsafe.Pointer to uintptr must occur in the Syscall expression itself. See the documentation of the unsafe package for details. Signed-off-by: Peter Morjan <peter.morjan@de.ibm.com>
- Loading branch information