Skip to content
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

Backport #3836 ([streamer] Fix musl build) to v2.1 branch #4639

Closed
wants to merge 1 commit into from

Conversation

jasl
Copy link

@jasl jasl commented Jan 26, 2025

Problem

It seems the v2.1 branch doesn't include #3836 which will meet trouble when built with MUSL

Summary of Changes

Backport #3836 to the v2.1 branch

* [streamer] Fix musl build

msghdr cannot be directly instantiated on musl due to private padding
fields (see rust-lang/libc#2344). The recommended solution is to use
`mem::zeroed` to initialize the struct then set the fields as needed.

While we could use the same solution for both glibc and musl, we use a
conditional compilation directive to avoid using unsafe code when it's
not required.

* fix lint warnings
@jasl jasl requested a review from a team as a code owner January 26, 2025 19:49
@mergify mergify bot mentioned this pull request Jan 26, 2025
@jasl
Copy link
Author

jasl commented Jan 26, 2025

BTW: I see v2.1.12 is cut. Is it possible to add this to version-bump-v2.1.12 branch as well?

@steviez
Copy link

steviez commented Jan 27, 2025

HI @jasl - We have some automation that handles backports for us, so I'm going to close this PR. We have cut v2.1.11 which bumps the version in tip of v2.1 branch to v2.1.12 for the next-in-line-release. So, this could possibly make it into v2.1.12, but that will be up for discussion.

I added the label to original PR and let automation create the BP PR, cross link: #4642

@steviez steviez closed this Jan 27, 2025
@jasl jasl deleted the backport-3836-to-v21 branch January 27, 2025 02:53
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.

3 participants