From: Daniel Stenberg Date: Wed, 25 Sep 2024 07:38:07 +0000 (+0200) Subject: build: fix cross-compile check for poll with bionic X-Git-Tag: curl-8_11_0~336 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7060b9b082e5726d4cc0974d9cb11dd20694c47a;p=thirdparty%2Fcurl.git build: fix cross-compile check for poll with bionic Since it seems the _POSIX_C_SOURCE "trick" does not work there, the check does not find poll(). Fixes #15013 Reported-by: vvb2060 on github Closes #15037 --- diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 8936cea016..e6e64bb7d5 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -95,7 +95,8 @@ if(NOT APPLE) #include int main(void) { - #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L + #if defined(__BIONIC__) || \ + defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L (void)poll(0, 0, 0); #else #error force compilation error diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index 2534fc5b46..851d50977f 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -3497,7 +3497,8 @@ AC_DEFUN([CURL_CHECK_FUNC_POLL], [ AC_LANG_PROGRAM([[ $curl_includes_stdlib ]],[[ - #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L + #if defined(__BIONIC__) || \ + (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) return 0; #else #error force compilation error