fix accidentally linking against kernel32 on non windows

This commit is contained in:
Andrew Kelley 2018-02-04 22:13:21 -05:00
parent 21ce559c9c
commit 31abef172a

View File

@ -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| {