From db1ad513089d1657fb38136f8658c51248dd9c34 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sat, 20 Jul 2024 15:52:44 +0200 Subject: [PATCH] cmake: check accept4 only on linux (#1157) Looks like iOS SDK is incorrectly detecting accept4 support --- cmake/re-config.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)