Skip to content

Commit 5e564d9

Browse files
authored
[Flang][runtime] Fix compilation errors introduced with PR #96652 (#97442)
1 parent 60cd3eb commit 5e564d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/runtime/time-intrinsic.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static constexpr inline unsigned_count_t GetHUGE(int kind) {
126126
// Function converts a std::timespec_t into the desired count to
127127
// be returned by the timing functions in accordance with the requested
128128
// kind at the call site.
129-
count_t ConvertTimeSpecToCount(int kind, const std::timespec &tspec) {
129+
count_t ConvertTimeSpecToCount(int kind, const struct timespec &tspec) {
130130
const unsigned_count_t huge{GetHUGE(kind)};
131131
unsigned_count_t sec{static_cast<unsigned_count_t>(tspec.tv_sec)};
132132
unsigned_count_t nsec{static_cast<unsigned_count_t>(tspec.tv_nsec)};
@@ -142,9 +142,9 @@ count_t ConvertTimeSpecToCount(int kind, const std::timespec &tspec) {
142142
// This is the fallback implementation, which should work everywhere.
143143
template <typename Unused = void>
144144
count_t GetSystemClockCount(int kind, fallback_implementation) {
145-
std::timespec tspec;
145+
struct timespec tspec;
146146

147-
if (std::timespec_get(&tspec, TIME_UTC) < 0) {
147+
if (timespec_get(&tspec, TIME_UTC) < 0) {
148148
// Return -HUGE(COUNT) to represent failure.
149149
return -static_cast<count_t>(GetHUGE(kind));
150150
}

0 commit comments

Comments
 (0)