Commit 31abef172a

Andrew Kelley <superjoe30@gmail.com>
2018-02-05 04:13:21
fix accidentally linking against kernel32 on non windows
1 parent 21ce559
Changed files (1)
std
os
windows
std/os/windows/util.zig
@@ -1,4 +1,5 @@
 const std = @import("../../index.zig");
+const builtin = @import("builtin");
 const os = std.os;
 const windows = std.os.windows;
 const assert = std.debug.assert;
@@ -170,6 +171,8 @@ pub fn windowsUnloadDll(hModule: windows.HMODULE) void {
 
 
 test "InvalidDll" {
+    if (builtin.os != builtin.Os.windows) return;
+
     const DllName = "asdf.dll";
     const allocator = std.debug.global_allocator;
     const handle = os.windowsLoadDll(allocator, DllName) catch  |err| {