1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/cni-plugins/ethtool-x86-go.patch
Francesco Colista fe569ef05e testing/cni-plugins: fix build on x86
Fail build on x86:
github.com/safchain/ethtool/ethtool.go:205:35: undefined: syscall.SYS_SOCKET

Applied patch as described here:
https://github.com/safchain/ethtool/pull/16
2019-05-13 10:20:25 +00:00

17 lines
642 B
Diff

diff --git a/vendor/github.com/safchain/ethtool/ethtool.go b/vendor/github.com/safchain/ethtool/ethtool.go
index 1f8828f..98387e6 100644
--- a/vendor/github.com/safchain/ethtool/ethtool.go
+++ b/vendor/github.com/safchain/ethtool/ethtool.go
@@ -202,9 +202,9 @@ func (e *Ethtool) Close() {
}
func NewEthtool() (*Ethtool, error) {
- fd, _, err := syscall.RawSyscall(syscall.SYS_SOCKET, syscall.AF_INET, syscall.SOCK_DGRAM, syscall.IPPROTO_IP)
- if err != 0 {
- return nil, syscall.Errno(err)
+ fd, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_DGRAM, syscall.IPPROTO_IP)
+ if err != nil {
+ return nil, err
}
return &Ethtool{