mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Use raw-dylib for Windows futex APIs
This is a workaround for older mingw `synchronization` import library not working on at least some system.
This commit is contained in:
committed by
Mark Rousskov
parent
dc070bc89e
commit
2775ae0fa9
@@ -357,7 +357,19 @@ pub fn GetTempPath2W(bufferlength: u32, buffer: PWSTR) -> u32 {
|
||||
}
|
||||
|
||||
#[cfg(not(target_vendor = "win7"))]
|
||||
#[link(name = "synchronization")]
|
||||
// Use raw-dylib to import synchronization functions to workaround issues with the older mingw import library.
|
||||
#[cfg_attr(
|
||||
target_arch = "x86",
|
||||
link(
|
||||
name = "api-ms-win-core-synch-l1-2-0",
|
||||
kind = "raw-dylib",
|
||||
import_name_type = "undecorated"
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(
|
||||
not(target_arch = "x86"),
|
||||
link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib")
|
||||
)]
|
||||
extern "system" {
|
||||
pub fn WaitOnAddress(
|
||||
address: *const c_void,
|
||||
|
||||
Reference in New Issue
Block a user