Skip to content

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Sep 5, 2025

Several fields in various HAL structures are named PAGESIZE which conflicts with the POSIX standard.

Since POSIX has been around for a few decades, is standardized, etc, and since the HAL definitions seem to have operated correctly without POSIX conformance, undefine the standard PAGESIZE macro in order to prevent compile errors.

Fixes zephyrproject-rtos/zephyr#95285

Several fields in various HAL structures are named `PAGESIZE` which
conflicts with the POSIX standard.

Since POSIX has been around for a few decades, is standardized, etc,
and since the HAL definitions seem to have operated correctly without
POSIX conformance, undefine the standard `PAGESIZE` macro in order to
prevent compile errors.

Fixes #95285

Signed-off-by: Chris Friedt <[email protected]>
@mmahadevan108
Copy link
Collaborator

Thanks @cfriedt for the PR.

@mmahadevan108 mmahadevan108 merged commit 809b1c1 into zephyrproject-rtos:master Sep 9, 2025
@yangbolu1991
Copy link
Member

@cfriedt
Could you add the patch to mcux/README patch list?
This is a special patch.

Thanks.

@butok
Copy link

butok commented Sep 11, 2025

Could HAL use lowercase for structure fields, since uppercase is typically reserved for macro definitions?

@mmahadevan108
Copy link
Collaborator

@cfriedt Could you add the patch to mcux/README patch list? This is a special patch.

Thanks.

This patch will be in the SDK repo. We do not need to maintain in our HAL.

@cfriedt cfriedt deleted the undef-pagesize branch September 15, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hal: nxp: mcux: usb_type struct in peri_usb.h defines pagesize field

4 participants