[libc-commits] [PATCH] D135731: [libc] add headers sys/auxv sys/prctl and sys/time

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Oct 12 10:13:03 PDT 2022


sivachandra added inline comments.


================
Comment at: libc/include/llvm-libc-macros/linux/sys-time-macros.h:15
+// seconds (1,000,000 is subtracted from usec and 1 is added to sec).
+#define timeradd(timeval_ptr_a, timeval_ptr_b, timeval_ptr_result)             \
+  (timeval_ptr_result)->tv_sec =                                               \
----------------
michaelrj wrote:
> sivachandra wrote:
> > We don't have the type `struct timeval` defined. So, why do we need these macros?
> `struct timeval` is defined in `libc/include/llvm-libc-types/struct_timeval.h`.
Sorry, what I mean is that `sys/time.h` is not defining the type. So, either we remove these macros, or add the definition of `struct timeval` in `sys/time.h` (by updating the spec and .td file appropriatley.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135731



More information about the libc-commits mailing list