Skip to content

Commit

Permalink
Add OpenBSD CLOCK_* constants
Browse files Browse the repository at this point in the history
  - 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]>
  • Loading branch information
lcheylus committed Mar 13, 2023
1 parent 60bf6d7 commit e71a4c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/netbsdlike/openbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e71a4c0

Please sign in to comment.