File: 001-fix-32bit-builds.patch

package info (click to toggle)
golang-github-juju-schema 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 192 kB
  • sloc: makefile: 5
file content (16 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Mathias Gibbens <mathias@calenhad.com>
Description: Fix integer sadness when dealing with huge numbers on 32bit architectures
Forwarded: https://github.com/juju/schema/issues/24
diff --git a/size.go b/size.go
index 4cbf8db..7d642f1 100644
--- a/size.go
+++ b/size.go
@@ -87,6 +87,6 @@ func parseSize(str string) (MB uint64, err error) {
 
 var sizeSuffixes = "MGTPEZY"
 
-func sizeSuffixMultiplier(i int) int {
-	return 1 << uint(i*10)
+func sizeSuffixMultiplier(i int) int64 {
+	return 1 << uint64(i*10)
 }