From d2c7999a572a19d49093dffacf97b6b5076f3bc8 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 23 Jun 2014 16:23:51 -0700 Subject: [PATCH] Fix cross compile for network and node pkgs Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- mount/nodes/nodes_unsupported.go | 4 +++- namespaces/unsupported.go | 1 + network/loopback.go | 2 ++ network/netns.go | 2 ++ network/network.go | 5 ++++- network/strategy.go | 2 ++ network/veth.go | 2 ++ 7 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mount/nodes/nodes_unsupported.go b/mount/nodes/nodes_unsupported.go index 00e59eb3..83660715 100644 --- a/mount/nodes/nodes_unsupported.go +++ b/mount/nodes/nodes_unsupported.go @@ -3,9 +3,11 @@ package nodes import ( + "errors" + "github.com/docker/libcontainer/devices" ) func CreateDeviceNodes(rootfs string, nodesToCreate []*devices.Device) error { - return ErrUnsupported + return errors.New("Unsupported method") } diff --git a/namespaces/unsupported.go b/namespaces/unsupported.go index 5fa8832a..9c44b658 100644 --- a/namespaces/unsupported.go +++ b/namespaces/unsupported.go @@ -3,6 +3,7 @@ package namespaces import ( + "github.com/docker/libcontainer" "github.com/docker/libcontainer/cgroups" ) diff --git a/network/loopback.go b/network/loopback.go index 284a4e65..0d36c4f8 100644 --- a/network/loopback.go +++ b/network/loopback.go @@ -1,3 +1,5 @@ +// +build linux + package network import ( diff --git a/network/netns.go b/network/netns.go index 4d132e7c..e2121cb0 100644 --- a/network/netns.go +++ b/network/netns.go @@ -1,3 +1,5 @@ +// +build linux + package network import ( diff --git a/network/network.go b/network/network.go index 94cd711d..48eeec60 100644 --- a/network/network.go +++ b/network/network.go @@ -1,8 +1,11 @@ +// +build linux + package network import ( - "github.com/docker/libcontainer/netlink" "net" + + "github.com/docker/libcontainer/netlink" ) func InterfaceUp(name string) error { diff --git a/network/strategy.go b/network/strategy.go index 00813f6b..358fb415 100644 --- a/network/strategy.go +++ b/network/strategy.go @@ -1,3 +1,5 @@ +// +build linux + package network import ( diff --git a/network/veth.go b/network/veth.go index 817144fa..20bc9e50 100644 --- a/network/veth.go +++ b/network/veth.go @@ -1,3 +1,5 @@ +// +build linux + package network import (