Hello,
I am trying to implement some of the linux syscalls: tcflush, tcdrain, etc, but apparently syscall, doesn't include the needed defines.
For example:
TCIOFLUSH constant is defined in the following files:
syscall/zerrors_netbsd_amd64.go:1250: TCIOFLUSH = 0x3
syscall/zerrors_freebsd_amd64.go:1297: TCIOFLUSH = 0x3
syscall/zerrors_netbsd_386.go:1260: TCIOFLUSH = 0x3
syscall/zerrors_darwin_amd64.go:1008: TCIOFLUSH = 0x3
syscall/zerrors_netbsd_arm.go:1249: TCIOFLUSH = 0x3
syscall/zerrors_freebsd_arm.go:1303: TCIOFLUSH = 0x3
syscall/zerrors_freebsd_386.go:1297: TCIOFLUSH = 0x3
syscall/zerrors_openbsd_amd64.go:1166: TCIOFLUSH = 0x3
syscall/zerrors_darwin_386.go:1008: TCIOFLUSH = 0x3
syscall/zerrors_openbsd_386.go:1160: TCIOFLUSH = 0x3
but not on my target platform: syscall/zerrors_linux_amd64.go
The needed defines are in the following files on my machine:
/usr/include/asm-generic/termbits.h:192:#define TCIOFLUSH 2
/usr/include/bits/termios.h:210:#define TCIOFLUSH 2
/usr/include/term.h:122:#ifndef TCIOFLUSH
/usr/include/term.h:123:#define TCIOFLUSH 2
To make the needed syscall for the flush, I need its definition, it is defined in:
/usr/include/asm-generic/ioctls.h:29:#define TCFLSH 0x540B
Why these defines are not in the syscall, and are they supposed to be there at all?
Will I need to define them in my source code?
Thanks.