Skip to content

bits: namespace REG_* macros to avoid colliding with sys/ucontext.h#81

Merged
kaniini merged 1 commit intokaniini:masterfrom
daandemeyer:fix-79
Apr 25, 2026
Merged

bits: namespace REG_* macros to avoid colliding with sys/ucontext.h#81
kaniini merged 1 commit intokaniini:masterfrom
daandemeyer:fix-79

Conversation

@daandemeyer
Copy link
Copy Markdown
Contributor

The public bits.h on x86 and x86_64 unconditionally defined REG_R8 (and friends) as macros. Including <sys/ucontext.h> alongside <libucontext/libucontext.h> then breaks because glibc declares the same names as enum members, which the preprocessor rewrites into invalid syntax. Rename the public macros to LIBUCONTEXT_REG_* so libucontext stops shadowing libc symbols.

The public bits.h on x86 and x86_64 unconditionally defined REG_R8
(and friends) as macros. Including <sys/ucontext.h> alongside
<libucontext/libucontext.h> then breaks because glibc declares the
same names as enum members, which the preprocessor rewrites into
invalid syntax. Rename the public macros to LIBUCONTEXT_REG_* so
libucontext stops shadowing libc symbols.
@kaniini kaniini merged commit 6d5ec8e into kaniini:master Apr 25, 2026
33 checks passed
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