diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-06-26 12:09:30 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-07-02 16:41:02 +0200 |
commit | c81a8f2b6d785e989eb091786dd473e383e2f00a (patch) | |
tree | f6abaf2ebb87386400642d46b4a729747b708e64 /libpod/container_attach_linux.go | |
parent | 1e0d63278519e09d7204babb1accb9c9f4b067ea (diff) | |
download | podman-c81a8f2b6d785e989eb091786dd473e383e2f00a.tar.gz podman-c81a8f2b6d785e989eb091786dd473e383e2f00a.tar.bz2 podman-c81a8f2b6d785e989eb091786dd473e383e2f00a.zip |
attach: move cgo bits to a different file
move the cgo bits to a separate file to allow building without cgo.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/container_attach_linux.go')
-rw-r--r-- | libpod/container_attach_linux.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libpod/container_attach_linux.go b/libpod/container_attach_linux.go index f5aac5794..fc53268c3 100644 --- a/libpod/container_attach_linux.go +++ b/libpod/container_attach_linux.go @@ -19,10 +19,6 @@ import ( "k8s.io/client-go/tools/remotecommand" ) -//#include <sys/un.h> -// extern int unix_path_length(){struct sockaddr_un addr; return sizeof(addr.sun_path) - 1;} -import "C" - /* Sync with stdpipe_t in conmon.c */ const ( AttachPipeStdin = 1 @@ -80,7 +76,7 @@ func (c *Container) attachContainerSocket(resize <-chan remotecommand.TerminalSi socketPath := c.AttachSocketPath() - maxUnixLength := int(C.unix_path_length()) + maxUnixLength := unixPathLength() if maxUnixLength < len(socketPath) { socketPath = socketPath[0:maxUnixLength] } |