Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: use rlim_t when working with limits
✗ CI failure Leah Neukirchen committed 1 year ago
commit 6904fd92bb90aea36fee4fd8fd90bde4191cc7bd
parent e130b4dc06ca02a035519e1ea86ffeafc788866f
1 failed (1 total) View logs
1 file changed +2 -5
modified radicle/src/io.rs
@@ -1,12 +1,9 @@
use std::fmt;
use std::io;

-
use libc::{getrlimit, rlimit, setrlimit, RLIMIT_NOFILE};
+
use libc::{getrlimit, rlim_t, rlimit, setrlimit, RLIMIT_NOFILE};

-
#[cfg(not(target_os = "freebsd"))]
-
type Int = u64;
-
#[cfg(target_os = "freebsd")]
-
type Int = i64;
+
type Int = rlim_t;

/// Sets the open file limit to the given value, or the maximum allowed value.
pub fn set_file_limit<N>(n: N) -> io::Result<Int>