diff options
author | Laurent Cheylus <foxy@free.fr> | 2023-03-13 18:16:49 +0100 |
---|---|---|
committer | Laurent Cheylus <foxy@free.fr> | 2023-03-13 18:16:49 +0100 |
commit | e71a4c0b1fd40050f50844e2a752576bcb6b5edb (patch) | |
tree | f8b83b9fd33b37da93d76fcff2de73987e26b77a | |
parent | 60bf6d7fa9d561820ea562751ee455ccf67d3015 (diff) | |
download | rust-libc-e71a4c0b1fd40050f50844e2a752576bcb6b5edb.tar.gz |
Add OpenBSD CLOCK_* constants
- src/unix/bsd/netbsdlike/openbsd/mod.rs: add CLOCK_* constants from
/usr/include/sys/_time.h
- libc-test/semver/openbsd.txt: update file for new constants CLOCK_*
Signed-off-by: Laurent Cheylus <foxy@free.fr>
-rw-r--r-- | libc-test/semver/openbsd.txt | 4 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsd/mod.rs | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index ef1ccab2cc..bf0a838280 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -98,6 +98,10 @@ CLD_EXITED CLD_KILLED CLD_STOPPED CLD_TRAPPED +CLOCK_BOOTTIME +CLOCK_PROCESS_CPUTIME_ID +CLOCK_THREAD_CPUTIME_ID +CLOCK_UPTIME CMSG_DATA CMSG_FIRSTHDR CMSG_LEN diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 87acecb6a7..192413a54a 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1660,6 +1660,12 @@ pub const MNT_WAIT: ::c_int = 1; pub const MNT_NOWAIT: ::c_int = 2; pub const MNT_LAZY: ::c_int = 3; +// sys/_time.h +pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4; +pub const CLOCK_UPTIME: ::clockid_t = 5; +pub const CLOCK_BOOTTIME: ::clockid_t = 6; + pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE; pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE; pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY; |