From 2b418c02fa72e7bd25939de3de073d83b913d28f Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Thu, 20 Nov 2025 16:20:21 +0100 Subject: [PATCH] Fixed struct stat layout mismatch on HP-UX due to include order On HP-UX IA-64, verify_files_utils.c included before config.h was loaded, causing struct stat and off_t to use 32-bit layout instead of the 64-bit layout required by _FILE_OFFSET_BITS=64. This resulted in st_size being read from the wrong offset, producing garbage values (e.g., 236662833 instead of 821 bytes) and "file corrupted in transit" errors during local file copies. Fixed by including platform.h first to ensure _FILE_OFFSET_BITS=64 is defined before any system headers. Ticket: ENT-13508 Signed-off-by: Lars Erik Wik --- cf-agent/verify_files_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cf-agent/verify_files_utils.c b/cf-agent/verify_files_utils.c index 6a195e3e18..2bd9ea996a 100644 --- a/cf-agent/verify_files_utils.c +++ b/cf-agent/verify_files_utils.c @@ -22,6 +22,7 @@ included file COSL.txt. */ +#include #include #include #include