Skip to content

Commit

Permalink
Fix build error with Ruby 3.1 on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Watson1978 authored and ioquatix committed Oct 3, 2024
1 parent 4dd449e commit b946479
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/io/event/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@

#include "selector/selector.h"

#ifdef HAVE_RUBY_WIN32_H
#include <ruby/win32.h>
#if !defined(HAVE_PIPE) && !defined(pipe)
#define pipe(p) rb_w32_pipe(p)
#endif
#endif

#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>

Expand Down

0 comments on commit b946479

Please sign in to comment.