~ chicken-core (chicken-5) 8c1015d4a8e219a98110f8a2ffe5e8f4777feb3f
commit 8c1015d4a8e219a98110f8a2ffe5e8f4777feb3f
Author: LemonBoy <thatlemon@gmail.com>
AuthorDate: Mon Dec 7 21:50:56 2015 +0100
Commit: Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Tue Dec 8 13:46:02 2015 +0100
Make ##sys#stat work with ports.
Signed-off-by: Christian Kellermann <ckeen@pestilenz.org>
diff --git a/posix-common.scm b/posix-common.scm
index fd4a8c58..9ccadcdf 100644
--- a/posix-common.scm
+++ b/posix-common.scm
@@ -223,6 +223,7 @@ EOF
(define (##sys#stat file link err loc)
(let ((r (cond ((fixnum? file) (##core#inline "C_fstat" file))
+ ((port? file) (##core#inline "C_fstat" (port->fileno file)))
((string? file)
(let ((path (##sys#make-c-string
(##sys#platform-fixup-pathname
Trap