From a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Aug 2018 14:28:03 +0200 Subject: [PATCH] inferior: Adjust for Guile 2.0. Partly fixes . Reported by Michael Bowcutt . * guix/inferior.scm (open-inferior): Wrap 'setvbuf' call in 'cond-expand'. --- guix/inferior.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index 629c2c4313..05c8d65deb 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -87,7 +87,10 @@ equivalent. Return #f if the inferior could not be launched." (define pipe (inferior-pipe directory command)) - (setvbuf pipe _IOLBF) + (cond-expand + ((and guile-2 (not guile-2.2)) #t) + (else (setvbuf pipe 'line))) + (match (read pipe) (('repl-version 0 rest ...) (let ((result (inferior 'pipe pipe (cons 0 rest))))