[all-commits] [llvm/llvm-project] b12385: [libc] [NFC] wait4Impl: include <signal.h> instead...

alfredfo via All-commits all-commits at lists.llvm.org
Sun Sep 3 16:51:42 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b12385f3aa56210b9dab0c56d2bf0f4a3d0c400d
  Author: Alfred Persson Forsberg <cat at catcream.org>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M libc/src/sys/wait/wait4Impl.h

  Log Message:
  [libc] [NFC] wait4Impl: include <signal.h> instead of <sys/signal.h>

sys/signal.h currently does not exist in LLVM-libc. Both glibc and
musl provides this header with simply:

> #include <signal.h>
(and a warning in musl libc)

If you try to build LLVM-libc in a sysroot with only LLVM-libc headers
and linux-headers installed then this will fail the build due to
missing headers. However, if --sysroot is not passed, then the
LLVM-libc build will pick up the header from the system which in turn
includes LLVM-libc's signal.h.

LLVM-libc includes <signal.h> in all other cases, so this simply
matches that. Providing <sys/signal.h> could also be done (instead)
for glibc compatibility.

More information about the All-commits mailing list