Skip to content

Use st_blksize and st_blocks members conditionally #18964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petk
Copy link
Member

@petk petk commented Jun 27, 2025

Instead of filtering Windows specifically, the preprocessor macros HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_BLOCKS can be used.

These members are mostly present on all POSIX-based systems except on Windows these days but this syncs the usage style across the code base.

Additionally, in ext/standard/ftp_fopen_wrapper.c to set ssb->sb.st_blocks, also ssb->sb.st_blksize is added in the condition.

Instead of filtering Windows specifically, the preprocessor macros
HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_BLOCKS can be used.

These members are mostly present on all POSIX-based systems except on
Windows these days but this syncs the usage style across the code base.

Additionally, in ext/standard/ftp_fopen_wrapper.c to set
ssb->sb.st_blocks, also ssb->sb.st_blksize is added in the condition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant