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