diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-04-25 00:43:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-25 00:45:35 +0200 |
commit | ecb33b87aafd9e240c2cb351525814cb1bb5ceb1 (patch) | |
tree | 0620336c1f4214ed119da62c60885a40b4236fe6 | |
parent | e7c7b7332075fadbbea3a2e041e7290958ac2354 (diff) | |
download | patches-ecb33b87aafd9e240c2cb351525814cb1bb5ceb1.tar patches-ecb33b87aafd9e240c2cb351525814cb1bb5ceb1.tar.gz |
vm: Adjust FAT serial number code to 32-bit Guile.
On 32-bit systems, 'string-hash' would raise an out-of-range exception
when the second argument was 2^32.
* gnu/build/vm.scm (make-iso9660-image): Pass 2^32 - 1 to 'string-hash'.
-rw-r--r-- | gnu/build/vm.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index f2953621ec..372cf63c68 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -473,8 +473,12 @@ GRUB configuration and OS-DRV as the stuff in it." ;; allows for deterministic builds. (setenv "GRUB_FAT_SERIAL_NUMBER" (number->string (if volume-uuid + + ;; On 32-bit systems the 2nd argument must be + ;; lower than 2^32. (string-hash (iso9660-uuid->string volume-uuid) - (expt 2 32)) + (- (expt 2 32) 1)) + #x77777777) 16)) |