me
/
guix
Archived
1
0
Fork 0

syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.

This fixes the failing test add-to-entropy-count in tests/syscalls.scm on
powerpc64le-linux.

* guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with
"powerpc64le", set this to #x80045201.  Otherwise, set it to #x40045201 as
before.
master
Chris Marusich 2021-02-21 16:05:58 -08:00
parent b57de27d03
commit c29bfbfc78
No known key found for this signature in database
GPG Key ID: DD409A15D822469D
1 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -942,7 +943,11 @@ backend device."
;;; ;;;
;; From <uapi/linux/random.h>. ;; From <uapi/linux/random.h>.
(define RNDADDTOENTCNT #x40045201) (define RNDADDTOENTCNT
;; Avoid using %current-system here to avoid depending on host-side code.
(if (string-prefix? "powerpc64le" %host-type)
#x80045201
#x40045201))
(define (add-to-entropy-count port-or-fd n) (define (add-to-entropy-count port-or-fd n)
"Add N to the kernel's entropy count (the value that can be read from "Add N to the kernel's entropy count (the value that can be read from