From fc443f3a7e9b9ce0791c9f6333c11eef69ff3279 Mon Sep 17 00:00:00 2001 From: Bo Date: Tue, 15 Sep 2020 21:57:27 +0300 Subject: [PATCH 1/2] Move the EV_STANDALONE to extconf.rb --- ext/nio4r/extconf.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/nio4r/extconf.rb b/ext/nio4r/extconf.rb index 2db638e..9bbb749 100644 --- a/ext/nio4r/extconf.rb +++ b/ext/nio4r/extconf.rb @@ -22,6 +22,8 @@ $defs << "-DEV_USE_PORT" if have_type("port_event_t", "port.h") $defs << "-DHAVE_SYS_RESOURCE_H" if have_header("sys/resource.h") +$defs << "-DEV_STANDALONE" # prevent libev from assuming "config.h" exists + CONFIG["optflags"] << " -fno-strict-aliasing" unless RUBY_PLATFORM =~ /mswin/ dir_config "nio4r_ext" From 8d9e31a60c763aaab7209a5398e64c80fa37484f Mon Sep 17 00:00:00 2001 From: Bo Date: Tue, 15 Sep 2020 21:57:59 +0300 Subject: [PATCH 2/2] Move the EV_STANDALONE to extconf.rb --- ext/nio4r/libev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/nio4r/libev.h b/ext/nio4r/libev.h index af251f6..4076348 100644 --- a/ext/nio4r/libev.h +++ b/ext/nio4r/libev.h @@ -1,5 +1,3 @@ -#define EV_STANDALONE /* keeps ev from requiring config.h */ - #ifdef _WIN32 #define EV_SELECT_IS_WINSOCKET 1 #define EV_USE_MONOTONIC 0