Skip to content

Commit e71a4c0

Browse files
committed
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 <[email protected]>
1 parent 60bf6d7 commit e71a4c0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/semver/openbsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ CLD_EXITED
9898
CLD_KILLED
9999
CLD_STOPPED
100100
CLD_TRAPPED
101+
CLOCK_BOOTTIME
102+
CLOCK_PROCESS_CPUTIME_ID
103+
CLOCK_THREAD_CPUTIME_ID
104+
CLOCK_UPTIME
101105
CMSG_DATA
102106
CMSG_FIRSTHDR
103107
CMSG_LEN

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,12 @@ pub const MNT_WAIT: ::c_int = 1;
16601660
pub const MNT_NOWAIT: ::c_int = 2;
16611661
pub const MNT_LAZY: ::c_int = 3;
16621662

1663+
// sys/_time.h
1664+
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2;
1665+
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4;
1666+
pub const CLOCK_UPTIME: ::clockid_t = 5;
1667+
pub const CLOCK_BOOTTIME: ::clockid_t = 6;
1668+
16631669
pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE;
16641670
pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE;
16651671
pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY;

0 commit comments

Comments
 (0)