From 70ddb25b6534b1dbf0e69b53dc768a80bb4838e0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 5 Feb 2017 15:12:22 -0800 Subject: bugfix: wrongly strict stream class check in poll. * sysif.c (poll_wrap): Fix function not accepting streams of type stdio-stream or any other derived stream type. We must check that the object is subtyped from stream, not that it's exactly of type stream. --- sysif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysif.c b/sysif.c index 26b67f3a..fa88128d 100644 --- a/sysif.c +++ b/sysif.c @@ -790,7 +790,7 @@ static val poll_wrap(val poll_list, val timeout_in) pfd[i].fd = c_num(obj); break; case COBJ: - if (obj->co.cls == stream_s) { + if (subtypep(obj->co.cls, stream_s)) { val fdval = stream_get_prop(obj, fd_k); if (!fdval) { free(pfd); -- cgit v1.2.3