aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cni-plugins/ethtool-x86-go.patch
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-05-13 10:19:03 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-05-13 10:20:25 +0000
commitfe569ef05ee26452a669c13768bcd16bbc43d82e (patch)
tree6dfe8e2ad0e215e3a182bdc2ec508a6ddfe42ca1 /testing/cni-plugins/ethtool-x86-go.patch
parent7c3c6c9d9ce0c95cfa925212bc9f11916d91a68d (diff)
downloadaports-fe569ef05ee26452a669c13768bcd16bbc43d82e.tar.bz2
aports-fe569ef05ee26452a669c13768bcd16bbc43d82e.tar.xz
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
Diffstat (limited to 'testing/cni-plugins/ethtool-x86-go.patch')
-rw-r--r--testing/cni-plugins/ethtool-x86-go.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/cni-plugins/ethtool-x86-go.patch b/testing/cni-plugins/ethtool-x86-go.patch
new file mode 100644
index 0000000000..00f2798b9d
--- /dev/null
+++ b/testing/cni-plugins/ethtool-x86-go.patch
@@ -0,0 +1,17 @@
+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{