Skip to content

Commit

Permalink
cmake: check accept4 only on linux
Browse files Browse the repository at this point in the history
Looks like iOS SDK is incorrectly detecting accept4 support
  • Loading branch information
sreimers committed Jul 20, 2024
1 parent 542a859 commit f2483f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/re-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ if(HAVE_THREADS)
list(APPEND RE_DEFINITIONS HAVE_THREADS)
endif()

check_function_exists(accept4 HAVE_ACCEPT4)
if(HAVE_ACCEPT4)
list(APPEND RE_DEFINITIONS HAVE_ACCEPT4)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
check_function_exists(accept4 HAVE_ACCEPT4)
if(HAVE_ACCEPT4)
list(APPEND RE_DEFINITIONS HAVE_ACCEPT4)
endif()
endif()

if(CMAKE_USE_PTHREADS_INIT)
Expand Down

0 comments on commit f2483f6

Please sign in to comment.