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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4886e20e89 Export MPTCP CMAKE var to header files (#12058)
4886e20e89 is described below

commit 4886e20e89c1c1fd5ab5f645de4da117eb3c4963
Author: Serris Lew <[email protected]>
AuthorDate: Wed Mar 5 11:50:39 2025 -0800

    Export MPTCP CMAKE var to header files (#12058)
    
    * Export MPTCP CMAKE var to header files
    
    * add textbuffer.h
    
    ---------
    
    Co-authored-by: Serris Lew <[email protected]>
---
 include/tscore/ink_config.h.cmake.in  | 1 +
 src/iocore/net/P_UnixNetVConnection.h | 4 ++--
 src/records/RecHttp.cc                | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/tscore/ink_config.h.cmake.in 
b/include/tscore/ink_config.h.cmake.in
index d243952d07..634ed94c37 100644
--- a/include/tscore/ink_config.h.cmake.in
+++ b/include/tscore/ink_config.h.cmake.in
@@ -103,6 +103,7 @@
 #cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
 #cmakedefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
 #cmakedefine HAVE_SYSCTLBYNAME 1
+#cmakedefine HAVE_STRUCT_MPTCP_INFO_SUBFLOWS 1
 
 #define SIZEOF_VOIDP @CMAKE_SIZEOF_VOID_P@
 
diff --git a/src/iocore/net/P_UnixNetVConnection.h 
b/src/iocore/net/P_UnixNetVConnection.h
index 40131a8439..922012b6e2 100644
--- a/src/iocore/net/P_UnixNetVConnection.h
+++ b/src/iocore/net/P_UnixNetVConnection.h
@@ -40,7 +40,7 @@
 #include "P_NetAccept.h"
 #include "iocore/net/NetEvent.h"
 
-#if HAVE_STRUCT_MPTCP_INFO_SUBFLOWS
+#if defined(HAVE_STRUCT_MPTCP_INFO_SUBFLOWS)
 #include <linux/mptcp.h>
 #endif
 
@@ -302,7 +302,7 @@ UnixNetVConnection::set_mptcp_state()
   Dbg(_dbg_ctl_socket_mptcp, "MPTCP_INFO and struct mptcp_info defined");
   if (0 == safe_getsockopt(get_fd(), SOL_MPTCP, MPTCP_INFO, &minfo, 
&minfo_len)) {
     if (minfo_len > 0) {
-      Dbg(_dbg_ctl_socket_mptcp, "MPTCP socket state (remote key received): 
%d",
+      Dbg(_dbg_ctl_socket_mptcp, "MPTCP socket state (remote key received): 
%lu",
           (minfo.mptcpi_flags & MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED));
       mptcp_state = (minfo.mptcpi_flags & MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED);
       return;
diff --git a/src/records/RecHttp.cc b/src/records/RecHttp.cc
index 8c89c366fd..bfafc28ab3 100644
--- a/src/records/RecHttp.cc
+++ b/src/records/RecHttp.cc
@@ -27,6 +27,7 @@
 #include <cstring>
 #include <strings.h>
 #include "tscore/ink_inet.h"
+#include "tscore/TextBuffer.h"
 #include "swoc/BufferWriter.h"
 #include <cstring>
 #include <string_view>

Reply via email to