Skip to content

Fix build with MI_NO_THP after the MADV_NOHUGEPAGE change - #1445

Merged
Daan (daanx) merged 1 commit into
microsoft:dev3from
DinoV:cpython-no-thp-build-fix
Oct 23, 2026
Merged

Daan (daanx) merged 1 commit into
microsoft:dev3from
DinoV:cpython-no-thp-build-fix

Conversation

@DinoV

Copy link
Copy Markdown
Contributor

unix_mmap now ends the MADV_NOHUGEPAGE branch with a dangling 'else' that is completed by the following '#if !defined(MI_NO_THP)' block. When MI_NO_THP is defined that block is compiled out, leaving the 'else' without a statement:

error: expected expression before '}' token

Wrap the THP block in braces so the 'else' always has a body.

unix_mmap now ends the MADV_NOHUGEPAGE branch with a dangling 'else'
that is completed by the following '#if !defined(MI_NO_THP)' block.
When MI_NO_THP is defined that block is compiled out, leaving the
'else' without a statement:

  error: expected expression before '}' token

Wrap the THP block in braces so the 'else' always has a body.
@daanx
Daan (daanx) merged commit 35d6c33 into microsoft:dev3 Oct 23, 2026
1 check passed
@daanx

Copy link
Copy Markdown
Collaborator

Ah, sorry!

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.

2 participants