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

zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 731a07e1a04 [fix](build) Fix MacOS compilation error when pch is 
disabled (#47870)
731a07e1a04 is described below

commit 731a07e1a0447348ef934495d2255c481d502e5b
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Fri Feb 14 11:22:41 2025 +0800

    [fix](build) Fix MacOS compilation error when pch is disabled (#47870)
    
    ## Description
    
    When compiling on MacOS with PCH (Precompiled Headers) disabled, the
    compilation fails with an undefined `INADDR_NONE` error. This is because
    the required header `<arpa/inet.h>` is not explicitly included. This PR
    fixes the issue by adding the necessary header inclusion.
    
    The error occurs because:
    1. On Linux, `INADDR_NONE` might be indirectly included through other
    system headers
    2. On MacOS, the header dependencies are more strict and require
    explicit inclusion
    3. When PCH is enabled, this issue is masked as all system headers are
    precompiled
    
    ## Changes
    - Add `<arpa/inet.h>` inclusion in
    `be/src/olap/rowset/beta_rowset_writer_v2.h`
---
 be/src/olap/rowset/beta_rowset_writer_v2.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/be/src/olap/rowset/beta_rowset_writer_v2.h 
b/be/src/olap/rowset/beta_rowset_writer_v2.h
index 9040003a68d..aa91aa0f403 100644
--- a/be/src/olap/rowset/beta_rowset_writer_v2.h
+++ b/be/src/olap/rowset/beta_rowset_writer_v2.h
@@ -17,6 +17,7 @@
 
 #pragma once
 
+#include <arpa/inet.h>
 #include <fmt/format.h>
 #include <gen_cpp/olap_file.pb.h>
 #include <stddef.h>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to