Skip to content

Commit aa11f3e

Browse files
Copilotyouknowone
andcommitted
Fix missing sem_* symbols on libc targets
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
1 parent ec25df2 commit aa11f3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/stdlib/src/multiprocessing.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ mod _multiprocessing {
5757
sync::atomic::{AtomicU64, AtomicUsize, Ordering},
5858
time::Duration,
5959
};
60+
unsafe extern "C" {
61+
fn sem_getvalue(sem: *mut sem_t, sval: *mut libc::c_int) -> libc::c_int;
62+
fn sem_timedwait(sem: *mut sem_t, abs_timeout: *const libc::timespec) -> libc::c_int;
63+
}
6064

6165
const RECURSIVE_MUTEX_KIND: i32 = 0;
6266
const SEMAPHORE_KIND: i32 = 1;

0 commit comments

Comments
 (0)