We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e1f5d9 commit f68529fCopy full SHA for f68529f
library/std/src/sys/pal/windows/c.rs
@@ -357,7 +357,19 @@ compat_fn_with_fallback! {
357
}
358
359
#[cfg(not(target_vendor = "win7"))]
360
-#[link(name = "synchronization")]
+// Use raw-dylib to import synchronization functions to workaround issues with the older mingw import library.
361
+#[cfg_attr(
362
+ target_arch = "x86",
363
+ link(
364
+ name = "api-ms-win-core-synch-l1-2-0",
365
+ kind = "raw-dylib",
366
+ import_name_type = "undecorated"
367
+ )
368
+)]
369
370
+ not(target_arch = "x86"),
371
+ link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib")
372
373
extern "system" {
374
pub fn WaitOnAddress(
375
address: *const c_void,
0 commit comments