diff --git a/io.c b/io.c index c0457731d0..6a0d7114d2 100644 --- a/io.c +++ b/io.c @@ -4670,7 +4670,8 @@ io_close_fptr(VALUE io) rb_io_t *fptr; VALUE write_io; rb_io_t *write_fptr; - LIST_HEAD(busy); + struct list_head busy; + busy.n.next = busy.n.prev = &busy.n; write_io = GetWriteIO(io); if (io != write_io) { diff --git a/thread.c b/thread.c index 00d8b43986..7ca6625d7c 100644 --- a/thread.c +++ b/thread.c @@ -2288,7 +2288,8 @@ rb_notify_fd_close(int fd, struct list_head *busy) void rb_thread_fd_close(int fd) { - LIST_HEAD(busy); + struct list_head busy; + busy.n.next = busy.n.prev = &busy.n; if (rb_notify_fd_close(fd, &busy)) { do rb_thread_schedule(); while (!list_empty(&busy));