Last active
November 6, 2017 00:33
-
-
Save sajattack/fb6e14f0f25e91a927da5002287bbaa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate core; | |
extern crate libc; | |
#[repr(C)] | |
pub struct dirent { | |
pub d_ino: libc::c_ulong, | |
pub d_off: libc::c_long, | |
pub d_reclen: libc::c_ushort, | |
pub d_type: libc::c_uchar, | |
pub d_name: [libc::c_char; 4096], | |
} | |
impl core::default::Default for dirent { | |
fn default() -> dirent { | |
dirent { | |
d_ino: 0, | |
d_off: 0, | |
d_reclen: 0, | |
d_type: 0, | |
d_name: [0; 4096], | |
} | |
} | |
} | |
fn main() { | |
let mut names: Vec<*mut dirent>; | |
names = Vec::with_capacity(4096); | |
names.resize_default(8192); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment