Skip to content

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Nov 24, 2025

Backported from #5947

Build HP-UX only:
Build Status

Ticket: ENT-7541
Changelog: none
(cherry picked from commit 519f54f)
@larsewi larsewi changed the title Added skip for run_lastseen_threaded_load.sh test on HP/UX ENT-7541: Added skip for run_lastseen_threaded_load.sh test on HP/UX (3.21.x) Nov 24, 2025
@larsewi larsewi marked this pull request as ready for review November 24, 2025 11:17
On HP-UX IA-64, verify_files_utils.c included <sys/types.h> 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 <lars.erik.wik@northern.tech>
(cherry picked from commit 2b418c0)
Always include platform.h before system headers. Otherwise types such as
off_t will use 32-bit layout instead of the 64-bit layout required by
_FILE_OFFSET_BITS=64 on HP-UX.

Ticket: ENT-13531
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
(cherry picked from commit c30bead)
@larsewi larsewi merged commit f317153 into cfengine:3.21.x Nov 24, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants