mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
update standalone tests for ws2_32 dependency
This commit is contained in:
parent
135ec79f50
commit
030ddc7952
@ -11,6 +11,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
if (is_windows) {
|
if (is_windows) {
|
||||||
test_obj.linkSystemLibrary("ntdll");
|
test_obj.linkSystemLibrary("ntdll");
|
||||||
test_obj.linkSystemLibrary("kernel32");
|
test_obj.linkSystemLibrary("kernel32");
|
||||||
|
test_obj.linkSystemLibrary("ws2_32");
|
||||||
}
|
}
|
||||||
|
|
||||||
const test_exe_mod = b.createModule(.{
|
const test_exe_mod = b.createModule(.{
|
||||||
|
|||||||
@ -224,7 +224,7 @@ fn renameExe(dir: std.fs.Dir, old_sub_path: []const u8, new_sub_path: []const u8
|
|||||||
error.AccessDenied => {
|
error.AccessDenied => {
|
||||||
if (attempt == 13) return error.AccessDenied;
|
if (attempt == 13) return error.AccessDenied;
|
||||||
// give the kernel a chance to finish closing the executable handle
|
// give the kernel a chance to finish closing the executable handle
|
||||||
std.os.windows.kernel32.Sleep(@as(u32, 1) << attempt >> 1);
|
_ = std.os.windows.kernel32.SleepEx(@as(u32, 1) << attempt >> 1, std.os.windows.FALSE);
|
||||||
attempt += 1;
|
attempt += 1;
|
||||||
continue;
|
continue;
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user