This is an automated email from the ASF dual-hosted git repository.
bcall 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 775a324d45 Fix format specifier for ip_source bitfield in
header_rewrite (#12677)
775a324d45 is described below
commit 775a324d45529829e4800935afa3b01efd84d331
Author: Bryan Call <[email protected]>
AuthorDate: Fri Nov 21 08:25:38 2025 -0800
Fix format specifier for ip_source bitfield in header_rewrite (#12677)
Use PRIu64 with explicit cast to uint64_t to match the bitfield's underlying
type and ensure cross-platform compatibility. This fixes build failures on
Ubuntu 20.04.
---
plugins/header_rewrite/conditions.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/header_rewrite/conditions.cc
b/plugins/header_rewrite/conditions.cc
index 11357033e2..7b0ea0d076 100644
--- a/plugins/header_rewrite/conditions.cc
+++ b/plugins/header_rewrite/conditions.cc
@@ -25,6 +25,7 @@
#include <unistd.h>
#include <arpa/inet.h>
#include <cctype>
+#include <cinttypes>
#include <sstream>
#include <array>
#include <atomic>
@@ -1768,7 +1769,7 @@ getClientAddr(TSHttpTxn txnp, int txn_private_slot)
TSHttpTxnVerifiedAddrGet(txnp, &addr);
break;
default:
- Dbg(pi_dbg_ctl, "Unknown IP source (%d) was specified",
private_data.ip_source);
+ Dbg(pi_dbg_ctl, "Unknown IP source (%" PRIu64 ") was specified",
static_cast<uint64_t>(private_data.ip_source));
addr = TSHttpTxnClientAddrGet(txnp);
break;
}