[all-commits] [llvm/llvm-project] bd0395: [libc] Move gettimeofday to sys/time.h header. (#2...

Alexey Samsonov via All-commits all-commits at lists.llvm.org
Thu Jul 16 15:04:09 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd0395ebfe9830b1e3dc9580021fb5a3ab343a51
      https://github.com/llvm/llvm-project/commit/bd0395ebfe9830b1e3dc9580021fb5a3ab343a51
  Author: Alexey Samsonov <vonosmas at gmail.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/docs/headers/time.rst
    M libc/include/sys/time.yaml
    M libc/include/time.yaml
    M libc/src/sys/time/CMakeLists.txt
    A libc/src/sys/time/gettimeofday.h
    M libc/src/sys/time/linux/CMakeLists.txt
    A libc/src/sys/time/linux/gettimeofday.cpp
    M libc/src/time/CMakeLists.txt
    R libc/src/time/gettimeofday.h
    M libc/src/time/linux/CMakeLists.txt
    R libc/src/time/linux/gettimeofday.cpp
    M libc/test/src/sys/time/CMakeLists.txt
    A libc/test/src/sys/time/gettimeofday_test.cpp
    M libc/test/src/time/CMakeLists.txt
    R libc/test/src/time/gettimeofday_test.cpp

  Log Message:
  -----------
  [libc] Move gettimeofday to sys/time.h header. (#210185)

`gettimeofday` is supposed to be declared in the `<sys/time.h>` header,
not the `<time.h>` where we've had it previously. Move the declaration
to the correct header, and move the files with implementation and unit
tests accordingly.

Note that `gettimeofday` is removed removed from POSIX-2024, but let's
keep it available for now, since there's fair amount of existing code
that still uses it.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list