Skip to content

Commit

Permalink
fix ios test case
Browse files Browse the repository at this point in the history
  • Loading branch information
flier committed Sep 4, 2018
1 parent 5600bd1 commit 49e6275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sem.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::os::raw::c_long;

use ffi::*;
use {IntoTimeout, WaitTimeout};

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

Semaphore { ptr }
}
Expand Down

0 comments on commit 49e6275

Please sign in to comment.