Browse Source

Merge pull request #34745 from simonferquel/fix-pkg-archive-conversion

Re-enable some conversion for darwin-amd64 platform
Yong Tang 7 years ago
parent
commit
945d80cd6a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pkg/archive/archive_unix.go

+ 2 - 2
pkg/archive/archive_unix.go

@@ -50,8 +50,8 @@ func setHeaderForSpecialDevice(hdr *tar.Header, name string, stat interface{}) (
 		// Currently go does not fill in the major/minors
 		// Currently go does not fill in the major/minors
 		if s.Mode&unix.S_IFBLK != 0 ||
 		if s.Mode&unix.S_IFBLK != 0 ||
 			s.Mode&unix.S_IFCHR != 0 {
 			s.Mode&unix.S_IFCHR != 0 {
-			hdr.Devmajor = int64(major(s.Rdev))
-			hdr.Devminor = int64(minor(s.Rdev))
+			hdr.Devmajor = int64(major(uint64(s.Rdev))) // nolint: unconvert
+			hdr.Devminor = int64(minor(uint64(s.Rdev))) // nolint: unconvert
 		}
 		}
 	}
 	}