Skip to content

Commit 96c23af

Browse files
[libc] fix 32bit arm build (casting time_t) (#92065)
1 parent f0a6816 commit 96c23af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libc/src/__support/time/units.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
namespace LIBC_NAMESPACE {
1616
namespace time_units {
1717
LIBC_INLINE constexpr time_t operator""_s_ns(unsigned long long s) {
18-
return s * 1'000'000'000;
18+
return static_cast<time_t>(s * 1'000'000'000);
1919
}
2020
LIBC_INLINE constexpr time_t operator""_s_us(unsigned long long s) {
21-
return s * 1'000'000;
21+
return static_cast<time_t>(s * 1'000'000);
2222
}
2323
LIBC_INLINE constexpr time_t operator""_s_ms(unsigned long long s) {
24-
return s * 1'000;
24+
return static_cast<time_t>(s * 1'000);
2525
}
2626
LIBC_INLINE constexpr time_t operator""_ms_ns(unsigned long long ms) {
27-
return ms * 1'000'000;
27+
return static_cast<time_t>(ms * 1'000'000);
2828
}
2929
LIBC_INLINE constexpr time_t operator""_ms_us(unsigned long long ms) {
30-
return ms * 1'000;
30+
return static_cast<time_t>(ms * 1'000);
3131
}
3232
LIBC_INLINE constexpr time_t operator""_us_ns(unsigned long long us) {
33-
return us * 1'000;
33+
return static_cast<time_t>(us * 1'000);
3434
}
3535
} // namespace time_units
3636
} // namespace LIBC_NAMESPACE

0 commit comments

Comments
 (0)