about summary refs log tree commit diff
path: root/library/std/src/sys/sync
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-07 19:42:33 +0000
committerMichael Goulet <michael@errs.io>2025-02-09 17:11:13 +0000
commita4e7f8f9bf10588cb5519ae09a15be155499901f (patch)
tree49525f3454d966963544c40b78793dc74f0702cc /library/std/src/sys/sync
parent04bbc8340a0e0031aef7f406c087a0ba64c1b491 (diff)
downloadrust-a4e7f8f9bf10588cb5519ae09a15be155499901f.tar.gz
rust-a4e7f8f9bf10588cb5519ae09a15be155499901f.zip
Mark extern blocks as unsafe
Diffstat (limited to 'library/std/src/sys/sync')
-rw-r--r--library/std/src/sys/sync/thread_parking/darwin.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/sync/thread_parking/darwin.rs b/library/std/src/sys/sync/thread_parking/darwin.rs
index 0553c5e19a9..a0d24a91e7c 100644
--- a/library/std/src/sys/sync/thread_parking/darwin.rs
+++ b/library/std/src/sys/sync/thread_parking/darwin.rs
@@ -24,7 +24,7 @@ const DISPATCH_TIME_NOW: dispatch_time_t = 0;
 const DISPATCH_TIME_FOREVER: dispatch_time_t = !0;
 
 // Contained in libSystem.dylib, which is linked by default.
-extern "C" {
+unsafe extern "C" {
     fn dispatch_time(when: dispatch_time_t, delta: i64) -> dispatch_time_t;
     fn dispatch_semaphore_create(val: isize) -> dispatch_semaphore_t;
     fn dispatch_semaphore_wait(dsema: dispatch_semaphore_t, timeout: dispatch_time_t) -> isize;