Skip to content

Commit 49e6275

Browse files
committed
fix ios test case
1 parent 5600bd1 commit 49e6275

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sem.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::os::raw::c_long;
2+
13
use ffi::*;
24
use {IntoTimeout, WaitTimeout};
35

@@ -18,7 +20,7 @@ impl Semaphore {
1820
/// Passing a value greater than zero is useful for managing a finite pool of resources,
1921
/// where the pool size is equal to the value.
2022
pub fn new(n: u64) -> Self {
21-
let ptr = unsafe { dispatch_semaphore_create(n as i64) };
23+
let ptr = unsafe { dispatch_semaphore_create(n as c_long) };
2224

2325
Semaphore { ptr }
2426
}

0 commit comments

Comments
 (0)