From f66187d234281bb7e5db0bedf47a6561030b7b38 Mon Sep 17 00:00:00 2001 From: Alexey Guskov Date: Fri, 5 Jun 2015 14:23:32 +0300 Subject: [PATCH] make libcontainer compile on freebsd (again) Signed-off-by: Alexey Guskov --- configs/{config_linux.go => config_unix.go} | 2 ++ configs/device_defaults.go | 2 +- configs/{namespaces_linux.go => namespaces_unix.go} | 2 +- devices/{devices_linux.go => devices_unix.go} | 2 ++ devices/number.go | 2 +- stats_freebsd.go | 5 +++++ system/sysconfig.go | 2 +- 7 files changed, 13 insertions(+), 4 deletions(-) rename configs/{config_linux.go => config_unix.go} (98%) rename configs/{namespaces_linux.go => namespaces_unix.go} (98%) rename devices/{devices_linux.go => devices_unix.go} (98%) create mode 100644 stats_freebsd.go diff --git a/configs/config_linux.go b/configs/config_unix.go similarity index 98% rename from configs/config_linux.go rename to configs/config_unix.go index 97544b2ab..89f580bfa 100644 --- a/configs/config_linux.go +++ b/configs/config_unix.go @@ -1,3 +1,5 @@ +// +build freebsd linux + package configs import "fmt" diff --git a/configs/device_defaults.go b/configs/device_defaults.go index b0966b975..0ce040fd3 100644 --- a/configs/device_defaults.go +++ b/configs/device_defaults.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux freebsd package configs diff --git a/configs/namespaces_linux.go b/configs/namespaces_unix.go similarity index 98% rename from configs/namespaces_linux.go rename to configs/namespaces_unix.go index c937b49ff..7bc908546 100644 --- a/configs/namespaces_linux.go +++ b/configs/namespaces_unix.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux freebsd package configs diff --git a/devices/devices_linux.go b/devices/devices_unix.go similarity index 98% rename from devices/devices_linux.go rename to devices/devices_unix.go index 7a11eaf11..a4df06c3a 100644 --- a/devices/devices_linux.go +++ b/devices/devices_unix.go @@ -1,3 +1,5 @@ +// +build linux freebsd + package devices import ( diff --git a/devices/number.go b/devices/number.go index e9c3e516a..885b6e5dd 100644 --- a/devices/number.go +++ b/devices/number.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux freebsd package devices diff --git a/stats_freebsd.go b/stats_freebsd.go new file mode 100644 index 000000000..f8d1d689c --- /dev/null +++ b/stats_freebsd.go @@ -0,0 +1,5 @@ +package libcontainer + +type Stats struct { + Interfaces []*NetworkInterface +} diff --git a/system/sysconfig.go b/system/sysconfig.go index b8434f105..b3a07cba3 100644 --- a/system/sysconfig.go +++ b/system/sysconfig.go @@ -1,4 +1,4 @@ -// +build cgo,linux +// +build cgo,linux cgo,freebsd package system