Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-export RLIM_INFINITY from libc #1831

Merged
merged 1 commit into from Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
([#1808](https://github.com/nix-rust/nix/pull/1808))
- Added `domainname` field of `UtsName` on Android and Linux
([#1817](https://github.com/nix-rust/nix/pull/1817))
- Re-export `RLIM_INFINITY` from `libc`
([#1831](https://github.com/nix-rust/nix/pull/1831))

### Changed

Expand Down
5 changes: 3 additions & 2 deletions src/sys/resource.rs
Expand Up @@ -6,6 +6,7 @@ use crate::errno::Errno;
use crate::sys::time::TimeVal;
use crate::Result;
pub use libc::rlim_t;
pub use libc::RLIM_INFINITY;
use std::mem;

cfg_if! {
Expand Down Expand Up @@ -175,7 +176,7 @@ libc_enum! {

/// Get the current processes resource limits
///
/// The special value `RLIM_INFINITY` indicates that no limit will be
/// The special value [`RLIM_INFINITY`] indicates that no limit will be
/// enforced.
///
/// # Parameters
Expand Down Expand Up @@ -224,7 +225,7 @@ pub fn getrlimit(resource: Resource) -> Result<(rlim_t, rlim_t)> {
/// * `hard_limit`: The ceiling for the soft limit. Must be lower or equal to
/// the current hard limit for non-root users.
///
/// The special value `RLIM_INFINITY` indicates that no limit will be
/// The special value [`RLIM_INFINITY`] indicates that no limit will be
/// enforced.
///
/// # Examples
Expand Down