Skip to content

Commit

Permalink
redefine pthread_t for l4re-uclibc
Browse files Browse the repository at this point in the history
  • Loading branch information
humenda committed Mar 12, 2018
1 parent 787420a commit aa6afb9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/unix/uclibc/mips/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub type pthread_t = ::c_ulong;

pub const SFD_CLOEXEC: ::c_int = 0x080000;

pub const NCCS: usize = 32;
Expand Down
1 change: 0 additions & 1 deletion src/unix/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub type id_t = ::c_uint;
pub type useconds_t = u32;
pub type dev_t = u64;
pub type socklen_t = u32;
pub type pthread_t = ::c_ulong;
pub type mode_t = u32;
pub type ino64_t = u64;
pub type off64_t = i64;
Expand Down
1 change: 1 addition & 0 deletions src/unix/uclibc/x86_64/l4re.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/// libc and hence we should provide them here.
pub type l4_umword_t = ::c_ulong; // Unsigned machine word.
pub type pthread_t = *mut ::c_void;

s! {
/// CPU sets.
Expand Down
5 changes: 4 additions & 1 deletion src/unix/uclibc/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ cfg_if! {
if #[cfg(target_os = "l4re")] {
mod l4re;
pub use self::l4re::*;
} else { }
} else {
mod other;
pub use other::*;
}
}

4 changes: 4 additions & 0 deletions src/unix/uclibc/x86_64/other.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Thestyle checker discourages the use of #[cfg], so this has to go into a
// separate module
pub type pthread_t = ::c_ulong;

0 comments on commit aa6afb9

Please sign in to comment.