Skip to content

Commit b946c18

Browse files
ynkanbluca
authored andcommitted
build: default to epoll for MinGW on Windows (fix IPC/select issue)
MinGW builds were falling back to select poller, which is incompatible with IPC and causes compilation failure. Default epoll is now enabled for both MSVC and MinGW to ensure consistent behavior. Comments updated accordingly.
1 parent 7d95ac0 commit b946c18

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,14 @@ if(WIN32)
383383
"${ZMQ_WIN32_WINNT_DEFAULT}"
384384
CACHE STRING "Value to set _WIN32_WINNT to for building [default=autodetect from build environment]")
385385

386-
# On Windows Vista or greater, with MSVC 2013 or greater, default to epoll (which is required on Win 10 for ipc
387-
# support)
386+
# On Windows Vista or greater, default to epoll for MSVC 2013+ and MinGW
387+
# to avoid falling back to select, which is incompatible with IPC transport.
388388
if(ZMQ_WIN32_WINNT GREATER "0x05FF"
389-
AND MSVC_VERSION GREATER 1799
390389
AND POLLER STREQUAL ""
391390
AND NOT ZMQ_HAVE_WINDOWS_UWP)
392-
set(POLLER "epoll")
391+
if(MSVC_VERSION GREATER 1799 OR MINGW)
392+
set(POLLER "epoll")
393+
endif()
393394
endif()
394395

395396
add_definitions(-D_WIN32_WINNT=${ZMQ_WIN32_WINNT})

0 commit comments

Comments
 (0)