| ... | @@ -14,7 +14,7 @@ const SetLastError = windows.kernel32.SetLastError; | ... | @@ -14,7 +14,7 @@ const SetLastError = windows.kernel32.SetLastError; |
| 14 | | 14 | |
| 15 | fn selectSymbol(comptime function_static: anytype, function_dynamic: @TypeOf(function_static), comptime os: std.Target.Os.WindowsVersion) @TypeOf(function_static) { | 15 | fn selectSymbol(comptime function_static: anytype, function_dynamic: @TypeOf(function_static), comptime os: std.Target.Os.WindowsVersion) @TypeOf(function_static) { |
| 16 | comptime { | 16 | comptime { |
| 17 | const sym_ok = builtin.Target.current.os.isAtLeast(.windows, os); | 17 | const sym_ok = std.Target.current.os.isAtLeast(.windows, os); |
| 18 | if (sym_ok == true) return function_static; | 18 | if (sym_ok == true) return function_static; |
| 19 | if (sym_ok == null) return function_dynamic; | 19 | if (sym_ok == null) return function_dynamic; |
| 20 | if (sym_ok == false) @compileError("Target OS range does not support function, at least " ++ @tagName(os) ++ " is required"); | 20 | if (sym_ok == false) @compileError("Target OS range does not support function, at least " ++ @tagName(os) ++ " is required"); |