I suggest to migrate from deprecated syscall package to golang.org/x/sys/unix package
I think that syscall Golang package is deprecated:
NOTE: This package is locked down. Code outside the standard Go repository should be migrated to use the corresponding package in the golang.org/x/sys repository. That is also where updates required by new systems or versions should be applied. Signal, Errno and SysProcAttr are not yet available in golang.org/x/sys and must still be referenced from the syscall package. See https://golang.org/s/go1.4-syscall for more information.
I think dhcp4 lib need to migrate to https://godoc.org/golang.org/x/sys/unix
Agreed in principal. However the current syscall package meets the current needs. I think the best way forward is to leave the bound_linux.go as is and create a new Conn with the new syscall package, that way it can be tested to death before rolling it out.
I think this may be biting us for an MacOS X build:
../../go/src/github.com/google/gopacket/pcapgo/capture.go:46:46: ETH_P_ALL not declared by package syscall
I think this may be biting us for an MacOS X build:
../../go/src/github.com/google/gopacket/pcapgo/capture.go:46:46: ETH_P_ALL not declared by package syscall
Dhcp4 doesn't import syscall on darwin targets. I presume you are using gopacket with dhcp4, which is introducing the syscall import. As such, you may want to contact gopacket. Alas, moving gopacket to https://godoc.org/golang.org/x/sys/unix may not help as ETH_P_ALL is listed in https://github.com/golang/sys/blob/master/unix/zerrors_linux_amd64.go, which only gets imported on linux (not darwin) - so you'll probably get the same error anyway.