Skip to content

[libc++] Sync the filesystem clock_gettime handling with chrono for OpenBSD #92675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcxx/src/chrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
# include <sys/time.h> // for gettimeofday and timeval
#endif

// OpenBSD does not have a fully conformant suite of POSIX timers, but
// it does have clock_gettime and CLOCK_MONOTONIC which is all we need.
// GNU Hurd and OpenBSD do not implement a fully conformant suite of POSIX timers, but
// they do have clock_gettime and CLOCK_MONOTONIC which are all we need.
#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
#endif
Expand Down
4 changes: 3 additions & 1 deletion libcxx/src/filesystem/filesystem_clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
# include <sys/time.h> // for gettimeofday and timeval
#endif

#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
// GNU Hurd and OpenBSD do not implement a fully conformant suite of POSIX timers, but
// they do have clock_gettime and CLOCK_MONOTONIC which are all we need.
#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
#endif

Expand Down
Loading