Skip to content

Rename rustix_int_0x80 and protect it from multiple definitions. #1396

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

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

sunfishcode
Copy link
Member

In lto builds, multiple versions of the rustix_int_0x80 assembly code can be included in the same .s file. To avoid conflicts when one of them comes from an older version of rustix, rename the symbol to rustix_x86_int_0x80, and to avoid conflicts with future versions, enclose the code in an ifndef block.

Fixes #1394.

In lto builds, multiple versions of the `rustix_int_0x80` assembly code
can be included in the same .s file. To avoid conflicts when one of them
comes from an older version of rustix, rename the symbol to
`rustix_x86_int_0x80`, and to avoid conflicts with future versions, enclose
the code in an `ifndef` block.

Fixes #1394.
When libc/extra_trais is not enabled, `libc::timespec` does not have a
`PartialEq` implementation, so compare the fields directly.
@sunfishcode sunfishcode merged commit 9726bf3 into main Mar 7, 2025
51 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/x86-int-0x80-name branch March 7, 2025 14:47
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.

"Symbol 'rustix_int_0x80' is already defined" error
1 participant