Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit ca96ad4

Browse files
authored
Merge pull request #860 from sc68cal/main
Cast to uint64 for Darwin platform
2 parents d64c3f3 + 6c509b1 commit ca96ad4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/runtime/containerd/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ func withDevices(devices []*runtime.Bind) oci.SpecOpts {
630630
return err
631631
}
632632

633-
major := int64(unix.Major(stat.Rdev))
634-
minor := int64(unix.Minor(stat.Rdev))
633+
// Cast up to uint64 from stat strut on other OS's
634+
major := int64(unix.Major(uint64(stat.Rdev)))
635+
minor := int64(unix.Minor(uint64(stat.Rdev)))
635636

636637
s.Linux.Resources.Devices = append(s.Linux.Resources.Devices, specs.LinuxDeviceCgroup{
637638
Type: devType,

0 commit comments

Comments
 (0)