From 59396e6b13e9820f076ee207e10bb936a06d0ae5 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Fri, 14 Apr 2017 11:39:35 -0700 Subject: [PATCH] fix cross-build --- pkg/util/term/resizeevents_windows.go | 3 ++- pkg/util/term/setsize_unsupported.go | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/util/term/resizeevents_windows.go b/pkg/util/term/resizeevents_windows.go index 2bb442a0c91..e38e0e0caf8 100644 --- a/pkg/util/term/resizeevents_windows.go +++ b/pkg/util/term/resizeevents_windows.go @@ -20,12 +20,13 @@ import ( "time" "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" ) // monitorResizeEvents spawns a goroutine that periodically gets the terminal size and tries to send // it to the resizeEvents channel if the size has changed. The goroutine stops when the stop channel // is closed. -func monitorResizeEvents(fd uintptr, resizeEvents chan<- Size, stop chan struct{}) { +func monitorResizeEvents(fd uintptr, resizeEvents chan<- remotecommand.TerminalSize, stop chan struct{}) { go func() { defer runtime.HandleCrash() diff --git a/pkg/util/term/setsize_unsupported.go b/pkg/util/term/setsize_unsupported.go index dd3de3126b3..6d6390d5680 100644 --- a/pkg/util/term/setsize_unsupported.go +++ b/pkg/util/term/setsize_unsupported.go @@ -18,7 +18,11 @@ limitations under the License. package term -func SetSize(fd uintptr, size Size) error { +import ( + "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" +) + +func SetSize(fd uintptr, size remotecommand.TerminalSize) error { // NOP return nil }