[libc-commits] [PATCH] D148371: [libc] Add support to compile some syscalls on 32 bit platform

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 2 11:02:42 PDT 2023


michaelrj accepted this revision.
michaelrj added a comment.
This revision is now accepted and ready to land.

LGTM with a minor nit



================
Comment at: libc/test/src/sched/sched_rr_get_interval_test.cpp:32
   auto TimespecToNs = [](struct timespec t) {
-    return t.tv_sec * 1000UL * 1000UL * 1000UL + t.tv_nsec;
+    return static_cast<unsigned long>(t.tv_sec * 1000UL * 1000UL * 1000UL +
+                                      t.tv_nsec);
----------------
nit: Generally I'd recommend using either `long long` or `uint64_t` for a larger type. `long` is only required to be at least 32 bits, and some systems (notably windows) use that size.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148371/new/

https://reviews.llvm.org/D148371



More information about the libc-commits mailing list