authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-04 22:13:21-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-04 22:13:21-05:00
log31abef172a4db98c6917ff9de064225c500cb275
treeaa268b0945d047267535fa79a40b5dfc9dc3c7ce
parent21ce559c9c923e62a76ffda6c26d31ac2e062acb

fix accidentally linking against kernel32 on non windows


1 files changed, 3 insertions(+), 0 deletions(-)

std/os/windows/util.zig+3
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("../../index.zig");1const std = @import("../../index.zig");
2const builtin = @import("builtin");
2const os = std.os;3const os = std.os;
3const windows = std.os.windows;4const windows = std.os.windows;
4const assert = std.debug.assert;5const assert = std.debug.assert;
...@@ -170,6 +171,8 @@ pub fn windowsUnloadDll(hModule: windows.HMODULE) void {...@@ -170,6 +171,8 @@ pub fn windowsUnloadDll(hModule: windows.HMODULE) void {
170171
171172
172test "InvalidDll" {173test "InvalidDll" {
174 if (builtin.os != builtin.Os.windows) return;
175
173 const DllName = "asdf.dll";176 const DllName = "asdf.dll";
174 const allocator = std.debug.global_allocator;177 const allocator = std.debug.global_allocator;
175 const handle = os.windowsLoadDll(allocator, DllName) catch |err| {178 const handle = os.windowsLoadDll(allocator, DllName) catch |err| {