Skip to content

Commit

Permalink
split personality in submodules instead of using #[cfg] for fixing th…
Browse files Browse the repository at this point in the history
…e lint error
  • Loading branch information
ndusart committed Jun 30, 2017
1 parent 56e4922 commit 2c46146
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@ extern {

pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
len: ::off_t) -> ::c_int;

pub fn personality(persona: ::c_uint) -> ::c_int;
}

cfg_if! {
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ extern {
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
pub fn vhangup() -> ::c_int;
pub fn personality(persona: ::c_ulong) -> ::c_int;
}

extern {
Expand Down
4 changes: 0 additions & 4 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,10 +1000,6 @@ extern {
suid: *mut ::uid_t) -> ::c_int;
pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
sgid: *mut ::gid_t) -> ::c_int;
#[cfg(target_os="android")]
pub fn personality(persona: ::c_uint) -> ::c_int;
#[cfg(not(target_os="android"))]
pub fn personality(persona: ::c_ulong) -> ::c_int;
pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
pub fn swapoff(puath: *const ::c_char) -> ::c_int;
pub fn acct(filename: *const ::c_char) -> ::c_int;
Expand Down

0 comments on commit 2c46146

Please sign in to comment.