mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
parent
2246812184
commit
f082e253b5
@ -232,7 +232,7 @@ pub const NativeTargetInfo = struct {
|
|||||||
// supports
|
// supports
|
||||||
std.os.sysctlbynameC(
|
std.os.sysctlbynameC(
|
||||||
"kern.osproductversion",
|
"kern.osproductversion",
|
||||||
&product_version[0],
|
&product_version,
|
||||||
&size,
|
&size,
|
||||||
null,
|
null,
|
||||||
0,
|
0,
|
||||||
@ -241,7 +241,8 @@ pub const NativeTargetInfo = struct {
|
|||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (std.builtin.Version.parse(product_version[0..size])) |ver| {
|
const string_version = product_version[0 .. size - 1 :0];
|
||||||
|
if (std.builtin.Version.parse(string_version)) |ver| {
|
||||||
os.version_range.semver.min = ver;
|
os.version_range.semver.min = ver;
|
||||||
os.version_range.semver.max = ver;
|
os.version_range.semver.max = ver;
|
||||||
} else |err| switch (err) {
|
} else |err| switch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user