Skip to content

Commit

Permalink
[BugFix] fix build issue on mac OS (#4175)
Browse files Browse the repository at this point in the history
* [BugFix] fix build issue on mac OS

* refine
  • Loading branch information
Rhett-Ying authored Jun 28, 2022
1 parent cb39dbf commit 1518861
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ endif(USE_AVX)

if ((NOT MSVC) AND USE_EPOLL)
INCLUDE(CheckIncludeFile)
check_include_file("sys/epoll.h" USE_EPOLL)
if (USE_EPOLL)
check_include_file("sys/epoll.h" EPOLL_AVAILABLE)
if (EPOLL_AVAILABLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_EPOLL")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_EPOLL")
else()
message(WARNING "EPOLL is not available on this platform...")
endif()
endif ()

Expand Down

0 comments on commit 1518861

Please sign in to comment.