Skip to content

Commit a8b00ef

Browse files
committed
Export RUSAGE_* symbols.
1 parent 6138cb4 commit a8b00ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/src/resource.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ mod resource {
4343
#[pyattr]
4444
use libc::{RLIMIT_NPTS, RLIMIT_SBSIZE, RLIMIT_SWAP, RLIMIT_VMEM};
4545

46+
#[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "freebds"))]
47+
#[pyattr]
48+
use libc::RUSAGE_THREAD;
49+
#[cfg(not(any(target_os = "windows", target_os = "redox")))]
50+
#[pyattr]
51+
use libc::{RUSAGE_CHILDREN, RUSAGE_SELF};
52+
4653
#[pyattr]
4754
#[pyclass(name = "struct_rusage")]
4855
#[derive(PyStructSequence)]

0 commit comments

Comments
 (0)