From 9dfc636fd613c5dac4717473ae2fd214f9835748 Mon Sep 17 00:00:00 2001
From: Paul Holzinger <paul.holzinger@web.de>
Date: Wed, 6 Jan 2021 23:32:40 +0100
Subject: Fix build for mips architecture follow-up

Follow-up to commit (1ad796677e1c). The build on mips is still
failing because SIGWINCH was not defined in the signal pkg.
Also stat_t.Rdev is unit32 on mips so we need to typecast.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
---
 pkg/specgen/generate/container.go | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

(limited to 'pkg/specgen')

diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index 42fea0277..c771e8bc8 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -282,8 +282,8 @@ func finishThrottleDevices(s *specgen.SpecGenerator) error {
 			if err := unix.Stat(k, &statT); err != nil {
 				return err
 			}
-			v.Major = (int64(unix.Major(statT.Rdev)))
-			v.Minor = (int64(unix.Minor(statT.Rdev)))
+			v.Major = (int64(unix.Major(uint64(statT.Rdev))))
+			v.Minor = (int64(unix.Minor(uint64(statT.Rdev))))
 			s.ResourceLimits.BlockIO.ThrottleReadBpsDevice = append(s.ResourceLimits.BlockIO.ThrottleReadBpsDevice, v)
 		}
 	}
@@ -293,8 +293,8 @@ func finishThrottleDevices(s *specgen.SpecGenerator) error {
 			if err := unix.Stat(k, &statT); err != nil {
 				return err
 			}
-			v.Major = (int64(unix.Major(statT.Rdev)))
-			v.Minor = (int64(unix.Minor(statT.Rdev)))
+			v.Major = (int64(unix.Major(uint64(statT.Rdev))))
+			v.Minor = (int64(unix.Minor(uint64(statT.Rdev))))
 			s.ResourceLimits.BlockIO.ThrottleWriteBpsDevice = append(s.ResourceLimits.BlockIO.ThrottleWriteBpsDevice, v)
 		}
 	}
@@ -304,8 +304,8 @@ func finishThrottleDevices(s *specgen.SpecGenerator) error {
 			if err := unix.Stat(k, &statT); err != nil {
 				return err
 			}
-			v.Major = (int64(unix.Major(statT.Rdev)))
-			v.Minor = (int64(unix.Minor(statT.Rdev)))
+			v.Major = (int64(unix.Major(uint64(statT.Rdev))))
+			v.Minor = (int64(unix.Minor(uint64(statT.Rdev))))
 			s.ResourceLimits.BlockIO.ThrottleReadIOPSDevice = append(s.ResourceLimits.BlockIO.ThrottleReadIOPSDevice, v)
 		}
 	}
@@ -315,8 +315,8 @@ func finishThrottleDevices(s *specgen.SpecGenerator) error {
 			if err := unix.Stat(k, &statT); err != nil {
 				return err
 			}
-			v.Major = (int64(unix.Major(statT.Rdev)))
-			v.Minor = (int64(unix.Minor(statT.Rdev)))
+			v.Major = (int64(unix.Major(uint64(statT.Rdev))))
+			v.Minor = (int64(unix.Minor(uint64(statT.Rdev))))
 			s.ResourceLimits.BlockIO.ThrottleWriteIOPSDevice = append(s.ResourceLimits.BlockIO.ThrottleWriteIOPSDevice, v)
 		}
 	}
-- 
cgit v1.2.3-54-g00ecf