diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-03 15:58:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 15:58:26 +0200 |
commit | a22a32a0a5507811168e0251a92122cf3e74ef51 (patch) | |
tree | 28f9cd8cfb7b45bf94e5c84b0cb19136c95c6749 /libpod/container_attach_linux.go | |
parent | bf7d5a9ce8455e4480b5e0ef92b02099f119ee71 (diff) | |
parent | 473d0604546ef472f167ee671fdf1110bf74eb63 (diff) | |
download | podman-a22a32a0a5507811168e0251a92122cf3e74ef51.tar.gz podman-a22a32a0a5507811168e0251a92122cf3e74ef51.tar.bz2 podman-a22a32a0a5507811168e0251a92122cf3e74ef51.zip |
Merge pull request #3437 from giuseppe/fix-nocgo
build: allow to build without cgo on RISC-V
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] } |