[libcxx-commits] [PATCH] D154390: [libc++] Avoid including things that require a filesystem in filesytem_clock.cpp
Michael Platings via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 4 10:50:38 PDT 2023
michaelplatings added a comment.
With these changes, copied from chrono.cpp, this patch fixes building with picolibc.
================
Comment at: libcxx/src/filesystem/filesystem_clock.cpp:22-24
#if !defined(CLOCK_REALTIME) && !defined(_LIBCPP_WIN32API)
# include <sys/time.h> // for gettimeofday and timeval
#endif
----------------
================
Comment at: libcxx/src/filesystem/filesystem_clock.cpp:39
chrono::duration_cast<duration>(__nsecs(tp.tv_nsec)));
#elif defined(CLOCK_REALTIME)
typedef chrono::duration<rep, nano> __nsecs;
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154390/new/
https://reviews.llvm.org/D154390
More information about the libcxx-commits
mailing list