Skip to content

Commit

Permalink
Declare Windows imports jobserver depends on (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton authored Sep 17, 2024
1 parent f494d82 commit adc71a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const WAIT_FAILED: DWORD = 4294967295u32;
const WAIT_OBJECT_0: DWORD = 0u32;
const WAIT_TIMEOUT: DWORD = 258u32;

#[link(name = "kernel32")]
extern "system" {
fn CloseHandle(handle: HANDLE) -> BOOL;
fn SetEvent(hEvent: HANDLE) -> BOOL;
Expand Down Expand Up @@ -64,6 +65,10 @@ extern "system" {
) -> HANDLE;
fn OpenSemaphoreA(dwDesiredAccess: DWORD, bInheritHandle: BOOL, lpName: *const i8) -> HANDLE;
fn WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: DWORD) -> DWORD;
}

#[link(name = "advapi32")]
extern "system" {
#[link_name = "SystemFunction036"]
fn RtlGenRandom(RandomBuffer: *mut u8, RandomBufferLength: u32) -> u8;
}
Expand Down

0 comments on commit adc71a5

Please sign in to comment.