diff options
author | Knight <knight42@mail.ustc.edu.cn> | 2016-07-27 20:39:48 +0800 |
---|---|---|
committer | Knight <knight42@mail.ustc.edu.cn> | 2016-07-27 21:04:27 +0800 |
commit | 881c4622a5d9078f719a406716b8d915513e6c96 (patch) | |
tree | de9bac894562aeab54f0e4d3fa6dabc341b0c400 | |
parent | a6b283b13328409bd60bb47d5a9fb4f13ea3f1d3 (diff) | |
download | rust-libc-881c4622a5d9078f719a406716b8d915513e6c96.tar.gz |
Add struct utmp for openbsd
-rw-r--r-- | src/unix/bsd/openbsdlike/openbsd.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/unix/bsd/openbsdlike/openbsd.rs b/src/unix/bsd/openbsdlike/openbsd.rs index b608fa5070..491ff840e8 100644 --- a/src/unix/bsd/openbsdlike/openbsd.rs +++ b/src/unix/bsd/openbsdlike/openbsd.rs @@ -137,8 +137,25 @@ s! { pub int_p_sign_posn: ::c_char, pub int_n_sign_posn: ::c_char, } + + pub struct lastlog { + ll_time: ::time_t, + ll_line: [::c_char; UT_LINESIZE], + ll_host: [::c_char; UT_HOSTSIZE], + } + + pub struct utmp { + pub ut_line: [::c_char; UT_LINESIZE], + pub ut_name: [::c_char; UT_NAMESIZE], + pub ut_host: [::c_char; UT_HOSTSIZE], + pub ut_time: ::time_t, + } } +pub const UT_NAMESIZE: usize = 32; +pub const UT_LINESIZE: usize = 8; +pub const UT_HOSTSIZE: usize = 256; + pub const O_CLOEXEC: ::c_int = 0x10000; pub const MS_SYNC : ::c_int = 0x0002; |