From dec831b4939a6332cac5d186a604ff2cbbcaf7af Mon Sep 17 00:00:00 2001 From: Haibo Xu Date: Thu, 24 Oct 2019 03:18:18 +0000 Subject: Cast the Stat_t.Nlink to uint64 on arm64. Since the syscall.Stat_t.Nlink is defined as different types on amd64 and arm64(uint64 and uint32 respectively), we need to cast them to a unified uint64 type in gVisor code. Signed-off-by: Haibo Xu Change-Id: I7542b99b195c708f3fc49b1cbe6adebdd2f6e96b --- pkg/p9/p9.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/p9/p9.go b/pkg/p9/p9.go index 25530adca..6039f5a42 100644 --- a/pkg/p9/p9.go +++ b/pkg/p9/p9.go @@ -814,7 +814,7 @@ func StatToAttr(s *syscall.Stat_t, req AttrMask) (Attr, AttrMask) { attr.Mode = FileMode(s.Mode) } if req.NLink { - attr.NLink = s.Nlink + attr.NLink = uint64(s.Nlink) } if req.UID { attr.UID = UID(s.Uid) -- cgit v1.2.3