Skip to content

Commit 6c434e2

Browse files
authored
Fix build error with Ruby 3.1 on Windows (#112)
Since Ruby 3.2, `pipe` function declaration is provided in https://github.com/ruby/ruby/blob/21c708ee802e1a59901eccc6448e40e8f72189b8/include/ruby/missing.h#L292 However, it does not provided it with Ruby 3.1. This patch will define `pipe` macro to use proper function due to fix build error.
1 parent 90396c3 commit 6c434e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/io/event/interrupt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525

2626
#include "selector/selector.h"
2727

28+
#ifdef HAVE_RUBY_WIN32_H
29+
#include <ruby/win32.h>
30+
#if !defined(HAVE_PIPE) && !defined(pipe)
31+
#define pipe(p) rb_w32_pipe(p)
32+
#endif
33+
#endif
34+
2835
#ifdef HAVE_SYS_EVENTFD_H
2936
#include <sys/eventfd.h>
3037

0 commit comments

Comments
 (0)