Skip to content

Commit a0d2d63

Browse files
committed
Fix RLIMIT_* for DragonFly
1 parent d04a160 commit a0d2d63

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@ pub const F_GETLK: ::c_int = 7;
6969
pub const F_SETLK: ::c_int = 8;
7070
pub const F_SETLKW: ::c_int = 9;
7171
pub const ELAST: ::c_int = 99;
72+
pub const RLIM_POSIXLOCKS: ::c_int = 11;
73+
pub const RLIM_NLIMITS: ::rlim_t = 12;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ pub const F_GETLK: ::c_int = 11;
5454
pub const F_SETLK: ::c_int = 12;
5555
pub const F_SETLKW: ::c_int = 13;
5656
pub const ELAST: ::c_int = 96;
57+
pub const RLIMIT_NPTS: ::c_int = 11;
58+
pub const RLIMIT_SWAP: ::c_int = 12;
59+
pub const RLIM_NLIMITS: ::rlim_t = 13;
5760

5861
extern {
5962
pub fn __error() -> *mut ::c_int;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,6 @@ pub const RLIMIT_NOFILE: ::c_int = 8;
395395
pub const RLIMIT_SBSIZE: ::c_int = 9;
396396
pub const RLIMIT_VMEM: ::c_int = 10;
397397
pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
398-
#[cfg(not(target_os = "dragonfly"))]
399-
pub const RLIMIT_NPTS: ::c_int = 11;
400-
#[cfg(not(target_os = "dragonfly"))]
401-
pub const RLIMIT_SWAP: ::c_int = 12;
402-
403-
pub const RLIM_NLIMITS: rlim_t = 13;
404398
pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
405399

406400
pub const RUSAGE_SELF: ::c_int = 0;

0 commit comments

Comments
 (0)