From d2851da325af0f448aee601b092be5dc359895df Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 6 Aug 2017 15:32:02 +0200 Subject: [PATCH] Make socket address parsing work on FreeBSD. On FreeBSD, it is perfectly reasonable to make use of util_linux.go. Rename util_linux.go to util_unix.go so that it may be used on non-Linux UNIX-like systems. Add proper 'freebsd' build tags. --- pkg/kubelet/util/BUILD | 2 +- pkg/kubelet/util/{util_linux.go => util_unix.go} | 2 +- pkg/kubelet/util/util_unsupported.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename pkg/kubelet/util/{util_linux.go => util_unix.go} (98%) diff --git a/pkg/kubelet/util/BUILD b/pkg/kubelet/util/BUILD index abfb8491465..d02977d2107 100644 --- a/pkg/kubelet/util/BUILD +++ b/pkg/kubelet/util/BUILD @@ -13,7 +13,7 @@ go_library( srcs = [ "doc.go", "util.go", - "util_linux.go", + "util_unix.go", ], tags = ["automanaged"], deps = [ diff --git a/pkg/kubelet/util/util_linux.go b/pkg/kubelet/util/util_unix.go similarity index 98% rename from pkg/kubelet/util/util_linux.go rename to pkg/kubelet/util/util_unix.go index 21d2c04b9b0..c0c70759974 100644 --- a/pkg/kubelet/util/util_linux.go +++ b/pkg/kubelet/util/util_unix.go @@ -1,4 +1,4 @@ -// +build linux +// +build freebsd linux /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/kubelet/util/util_unsupported.go b/pkg/kubelet/util/util_unsupported.go index 616aabfe3b3..ffc4d642d70 100644 --- a/pkg/kubelet/util/util_unsupported.go +++ b/pkg/kubelet/util/util_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !freebsd,!linux,!windows /* Copyright 2017 The Kubernetes Authors.