Skip to content

Commit

Permalink
Change resource type for setrlimit to uint
Browse files Browse the repository at this point in the history
  • Loading branch information
tmlbl committed Jun 27, 2019
1 parent ef5918e commit 0240f6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Expand Up @@ -1343,7 +1343,7 @@ fn fork_first(

// set rlimits (before entering user ns)
for rlimit in rlimits.iter() {
setrlimit(rlimit.typ as i32, rlimit.soft, rlimit.hard)?;
setrlimit(rlimit.typ as u32, rlimit.soft, rlimit.hard)?;
}

if userns {
Expand Down
2 changes: 1 addition & 1 deletion src/nix_ext.rs
Expand Up @@ -39,7 +39,7 @@ pub fn setgroups(gids: &[libc::gid_t]) -> Result<()> {

#[inline]
pub fn setrlimit(
resource: libc::c_int,
resource: libc::c_uint,
soft: libc::c_ulonglong,
hard: libc::c_ulonglong,
) -> Result<()> {
Expand Down

0 comments on commit 0240f6a

Please sign in to comment.