libgreen: use FFI-safe types

This commit is contained in:
Corey Richardson
2014-08-14 15:49:26 -04:00
parent 2dc2ac1e6b
commit cf5d28083d
4 changed files with 45 additions and 31 deletions

View File

@@ -107,13 +107,14 @@ mod select {
#[cfg(target_os = "linux")]
mod select {
use std::uint;
use libc;
pub static FD_SETSIZE: uint = 1024;
#[repr(C)]
pub struct fd_set {
// FIXME: shouldn't this be a c_ulong?
fds_bits: [uint, ..(FD_SETSIZE / uint::BITS)]
fds_bits: [libc::uintptr_t, ..(FD_SETSIZE / uint::BITS)]
}
pub fn fd_set(set: &mut fd_set, fd: i32) {