From 3b29a72b3b59803307e9040a6832e579901211f3 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sat, 29 Feb 2020 23:08:57 +0100 Subject: [PATCH] Use .len instead of @sizeOf --- lib/std/zig/system.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 234c1a6550..7e23410fa8 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -225,7 +225,7 @@ pub const NativeTargetInfo = struct { }, .macosx => { var product_version: [32]u8 = undefined; - var size: usize = @sizeOf(@TypeOf(product_version)); + var size: usize = product_version.len; // The osproductversion sysctl was introduced first with // High Sierra, thankfully that's also the baseline that Zig