diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-04-17 23:17:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-04-17 23:31:28 +0200 |
commit | e16c823f802d09965acf50cad64ab278dc01c1b2 (patch) | |
tree | 0b68fdce4bab926727aef0dc880511b3720b301e | |
parent | 94df39cc085fe81685315b0991f5f10ddc757e99 (diff) | |
download | patches-e16c823f802d09965acf50cad64ab278dc01c1b2.tar patches-e16c823f802d09965acf50cad64ab278dc01c1b2.tar.gz |
serialization: Remove Guile < 2.0.9 workaround.
* guix/serialization.scm (write-contents): Assume 'sendfile' is always
defined.
-rw-r--r-- | guix/serialization.scm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/guix/serialization.scm b/guix/serialization.scm index 4a8cd2086e..e6ae2fc307 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -214,9 +214,8 @@ substitute invalid byte sequences with question marks. This is a (write-string "contents" p) (write-long-long size p) (call-with-binary-input-file file - ;; Use `sendfile' when available (Guile 2.0.8+). - (if (and (compile-time-value (defined? 'sendfile)) - (file-port? p)) + ;; Use 'sendfile' when P is a file port. + (if (file-port? p) (cut sendfile p <> size 0) (cut dump <> p size))) (write-padding size p)) |