From bc5e5b6db7d6cd3f201a6cd3c7a50adcaf9c3c6e Mon Sep 17 00:00:00 2001 From: Bo Date: Wed, 16 Sep 2020 00:14:57 +0300 Subject: [PATCH] Move `EV_STANDALONE` definition to `extconf.rb` (#250) Move the EV_STANDALONE to extconf.rb --- ext/nio4r/extconf.rb | 2 ++ ext/nio4r/libev.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) 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" 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