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

target: Implement OS version detection for OSX #4589

Merged
merged 3 commits into from
Mar 1, 2020

Conversation

LemonBoy
Copy link
Contributor

If needed we can implement a fallback for some older versions using kern.osrelease and a table mapping the kernel version to the osx one (see here for more info).

Closes #4583

@@ -224,7 +224,31 @@ pub const NativeTargetInfo = struct {
// TODO Detect native operating system version.
},
.macosx => {
// TODO Detect native operating system version.
var product_version: [32]u8 = undefined;
var size: usize = @sizeOf(@TypeOf(product_version));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use product_version.len here. If the type was changed to e.g. a slice then it would still be correct instead of a bug.

@andrewrk andrewrk merged commit c903b76 into ziglang:master Mar 1, 2020
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.

implement the native operating system version detection for macOS
2 participants