This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new 3db9135cd65 branch-4.2: [fix](build) Load float.h before macOS system 
headers #69136 (#69185)
3db9135cd65 is described below

commit 3db9135cd65db4206a53a7356c3284330629a778
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Oct 16 23:34:27 2026 +0800

    branch-4.2: [fix](build) Load float.h before macOS system headers #69136 
(#69185)
    
    Cherry-picked from #69136
    
    Co-authored-by: zy-kkk <[email protected]>
---
 be/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 47e69d3907e..d165c3e57b8 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -390,6 +390,10 @@ add_definitions(-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H)
 # Mac specific definitions - needed for system headers and third-party libs
 if (OS_MACOSX)
     add_definitions(-D_DARWIN_C_SOURCE)
+    # macOS 27's math.h requests only INFINITY/NAN from float.h. libc++'s
+    # float.h include guard then hides the remaining macros on later includes
+    # (e.g. DBL_EPSILON in S2). Load the full header before any source or PCH.
+    add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include float.h>")
 endif()
 
 if (RECORD_COMPILER_SWITCHES)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to