adding SUN_LEN macro to linux glibc/musl#4269
Conversation
b247c2b to
ee55445
Compare
|
I'm just going to mark this blocked since I don't yet know what to do without @rustbot blocked |
|
Reminder, once the PR becomes ready for a review, use |
ee55445 to
7236f08
Compare
This comment has been minimized.
This comment has been minimized.
8891822 to
83539f3
Compare
|
@rustbot ready |
| let fptr = unsafe { core::ptr::addr_of!((*ptr).$field) }; | ||
| let off = (fptr as usize).checked_sub(ptr as usize).unwrap(); | ||
| assert!(off <= core::mem::size_of::<$Ty>()); | ||
| core::assert!(off <= core::mem::size_of::<$Ty>()); |
There was a problem hiding this comment.
If you could split macro changes to a separate commit that would be ideal (distinct changes in separate commits makes the backporting easier)
There was a problem hiding this comment.
@devnexen the first commit still has some macro changes, and the second commit undoes part of the first. It should be split so that one commit does all the changes in macros.rs, then another commit does the rest.
(I'm happy to take care of this for you if you'd like, just don't like touching commit contents without asking)
179d625 to
1602d4d
Compare
- assert! access from core. - nested unsafe raises an error on older rust compilers on CI. [ re-split commits as authorized by the author, and update the commit summary - Trevor ]
[glibc ref](https://github.com/bminor/glibc/blob/1b6f868625403d6b7683af840e87d2b18d5d7731/socket/sys/un.h#L41) [musl ref](https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/include/sys/un.h#L24) [ re-split commits as authorized by the author - Trevor ]
1602d4d to
cc88a5f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
tgross35
left a comment
There was a problem hiding this comment.
Should be all set, thanks!
- assert! access from core. - nested unsafe raises an error on older rust compilers on CI. [ re-split commits as authorized by the author, and update the commit summary - Trevor ] (backport <rust-lang#4269>) (cherry picked from commit c20475c)
[glibc ref](https://github.com/bminor/glibc/blob/1b6f868625403d6b7683af840e87d2b18d5d7731/socket/sys/un.h#L41) [musl ref](https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/include/sys/un.h#L24) [ re-split commits as authorized by the author - Trevor ] (backport <rust-lang#4269>) (cherry picked from commit 34d6637)
[glibc ref](https://github.com/bminor/glibc/blob/1b6f868625403d6b7683af840e87d2b18d5d7731/socket/sys/un.h#L41) [musl ref](https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/include/sys/un.h#L24) [ re-split commits as authorized by the author - Trevor ] (backport <#4269>) (cherry picked from commit 34d6637)
glibc ref musl ref