You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/10/23 17:15:52 UTC

[trafficserver] 03/03: Check F_GETPIPE_SZ is defined to fix macOS build

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

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 067a3d3e3da96bc5f88bd3248374f22e0b4bb90d
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Sep 4 11:58:54 2019 +0900

    Check F_GETPIPE_SZ is defined to fix macOS build
    
    (cherry picked from commit 92d4ef1424f547735bfc33ca847c8ac5ab19cd8a)
---
 doc/admin-guide/logging/examples.en.rst | 4 ++--
 proxy/logging/LogFile.cc                | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/doc/admin-guide/logging/examples.en.rst b/doc/admin-guide/logging/examples.en.rst
index f1d0840..abe12fb 100644
--- a/doc/admin-guide/logging/examples.en.rst
+++ b/doc/admin-guide/logging/examples.en.rst
@@ -303,8 +303,8 @@ Configuring ASCII Pipe Buffer Size
 ==================================
 
 This example mirrors the one above but also sets a ```pipe_buffer_size``` of
-1024 * 1024 for the pipe. This can be set on a per-pipe basis but is not 
-available on FreeBSD dists of ATS. If this field is not set, the pipe buffer
+1024 * 1024 for the pipe. This can be set on a per-pipe basis but is only
+available on Linux (later than 2.6.35). If this field is not set, the pipe buffer
 will default to the OS default size.
 
 .. code:: yaml
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 4154329..1d7d0a1 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -188,9 +188,7 @@ LogFile::open_file()
       return LOG_FILE_NO_PIPE_READERS;
     }
 
-#ifdef __FreeBSD__
-    // we don't do this for FreeBSD
-#else
+#ifdef F_GETPIPE_SZ
     // adjust pipe size if necessary
     if (m_pipe_buffer_size) {
       long pipe_size = (long)fcntl(m_fd, F_GETPIPE_SZ);
@@ -212,7 +210,7 @@ LogFile::open_file()
         Debug("log-file", "NEW pipe size for pipe %s = %ld", m_name, pipe_size);
       }
     }
-#endif
+#endif // F_GETPIPE_SZ
   } else {
     if (m_log) {
       int status = m_log->open_file(Log::config->logfile_perm);