-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fixes #31229 - fixes up BSD type mismatch errors and updates libc dependency. DEAD, see PR #31263 #31230
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -224,7 +224,7 @@ impl DirEntry { | |||
fn name_bytes(&self) -> &[u8] { | |||
unsafe { | |||
::slice::from_raw_parts(self.entry.d_name.as_ptr() as *const u8, | |||
self.entry.d_namelen as usize) | |||
self.entry.d_namlen as usize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you unify this with the block above? after this change they're all the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unified now. thanks, i missed that.
@dhuseby could you merge back openbsd definition of There is a small difference in `HW_NCPU' meaning, but I think it shouldn't be a problem (under OpenBSD it is "number of cpus being used" whereas for NetBSD, FreeBSD and DragonFly it is "number of cups"). |
@semarie on OpenBSD, is the sysconf(_SC_NPROCESSORS_ONLN) the same as the sysctl(HW_NCPUS)? Technically, sysconf is the POSIX way to get the number of available CPUs whereas the sysctl function isn't. I'm not against switching back, but I would like to better understand why. I think switching to sysconf(_SC_NPROCESSORS_ONLN) is more accurate and more portable. |
@dhuseby yes |
Could you also tweak the title of the PR and the commit message to expand a little more what's going on? Helps out those who skim the git logs! |
wtf? i didn't mean to close it. the latest commit isn't being picked up. i'll start another pr. |
Something went haywire with github last night and the old PR #31230 got closed somehow. This new PR is to replace the old one. This incorporates all of the feedback from the other PR. @alexcrichton I incorporated the suggestion from @semarie and the result is cleaner and clearer. I think this is ready to go.
fixes the type mismatches breaking the build.