Skip to content

Conversation

@larsewi
Copy link
Contributor

@larsewi larsewi commented Nov 20, 2025

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

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>
@larsewi
Copy link
Contributor Author

larsewi commented Nov 20, 2025

HP-UX only:
Build Status

@larsewi larsewi marked this pull request as ready for review November 20, 2025 16:42
@larsewi larsewi merged commit 07ede16 into cfengine:master Nov 21, 2025
12 of 13 checks passed
@larsewi
Copy link
Contributor Author

larsewi commented Nov 24, 2025

Backported to #5958

@larsewi
Copy link
Contributor Author

larsewi commented Nov 24, 2025

Backported to #5959

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.

2 participants