I was trying to build a package which depends on github.com/google/gopacket/pcap which depends on this package. I need (yes I know...) really need to run it on a 32bit Linux install but the build fails:
# github.com/mdlayher/raw
../../mdlayher/raw/raw_linux.go:316:32: undefined: syscall.SYS_GETSOCKOPT
../../mdlayher/raw/raw_linux.go:329:32: undefined: syscall.SYS_SETSOCKOPT
../../mdlayher/raw/timeval.go:17:6: cannot use int64(timeout / time.Second) (type int64) as type int32 in field value
../../mdlayher/raw/timeval.go:18:7: cannot use int64(timeout % time.Second / time.Microsecond) (type int64) as type int32 in field value
I am aware that a i386 build is not a priority in 2018 but this could probably be solved with just build costraints and splitting out the statistics into a separate file?
So instead of // +build linux use '// +build linux,!386for 64bit and// +build linux,386` for the 32bit files? Unfortunately I am a Go beginner so testing this enough to present a patch is proving a bit painful for me...
I was trying to build a package which depends on github.com/google/gopacket/pcap which depends on this package. I need (yes I know...) really need to run it on a 32bit Linux install but the build fails:
I am aware that a i386 build is not a priority in 2018 but this could probably be solved with just build costraints and splitting out the statistics into a separate file?
So instead of
// +build linux
use '// +build linux,!386for 64bit and
// +build linux,386` for the 32bit files? Unfortunately I am a Go beginner so testing this enough to present a patch is proving a bit painful for me...