File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,13 @@ SOFTWARE.
121121
122122// / Tests multiplex io model of current OS
123123
124+ // poll
125+ #if !defined(_WIN32) || NTDDI_VERSION >= NTDDI_VISTA
126+ # define YASIO__HAS_POLL 1
127+ #else
128+ # define YASIO__HAS_POLL 0
129+ #endif
130+
124131// ppoll
125132#if defined(__linux__) && !defined(__ANDROID__) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 21)
126133# define YASIO__HAS_PPOLL 1
Original file line number Diff line number Diff line change 1717#elif YASIO__HAS_EVPORT && defined(YASIO_ENABLE_HPERF_IO)
1818# include " yasio/impl/evport_io_watcher.hpp"
1919#elif !defined(YASIO_DISABLE_POLL)
20- # include " yasio/impl/poll_io_watcher.hpp"
20+ # if YASIO__HAS_POLL
21+ # include " yasio/impl/poll_io_watcher.hpp"
22+ # else
23+ # pragma message("Falling back to select_io_watcher due to target OS(NT < 6.0) not support it")
24+ # include " yasio/impl/select_io_watcher.hpp"
25+ # endif
2126#else
2227# include " yasio/impl/select_io_watcher.hpp"
2328#endif
@@ -33,7 +38,7 @@ using io_watcher = kqueue_io_watcher;
3338using io_watcher = epoll_io_watcher;
3439#elif defined(YASIO__EVPORT_IO_WATCHER_HPP)
3540using io_watcher = evport_io_watcher;
36- #elif !defined(YASIO_DISABLE_POLL)
41+ #elif !defined(YASIO_DISABLE_POLL) && YASIO__HAS_POLL
3742using io_watcher = poll_io_watcher;
3843#else
3944using io_watcher = select_io_watcher;
You can’t perform that action at this time.
0 commit comments