diff --git a/cmake/re-config.cmake b/cmake/re-config.cmake index c45216800..f914f761f 100644 --- a/cmake/re-config.cmake +++ b/cmake/re-config.cmake @@ -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)