diff --git a/guix/store.scm b/guix/store.scm index 0c99e623ec..8c774a6db2 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -397,11 +397,13 @@ (define %stderr-error #x63787470) ; "cxtp", error reporting #f) ((= k %stderr-read) ;; Read a byte stream from USER-PORT. + ;; Note: Avoid 'get-bytevector-n' to work around + ;; in Guile up to 2.0.11. (let* ((max-len (read-int p)) - (data (get-bytevector-n user-port max-len)) - (len (bytevector-length data))) + (data (make-bytevector max-len)) + (len (get-bytevector-n! user-port data 0 max-len))) (write-int len p) - (put-bytevector p data) + (put-bytevector p data 0 len) (write-padding len p) #f)) ((= k %stderr-next)