[libc-commits] [libc] [libc] Implement waitid in sys/wait (PR #227815)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Tue Oct 6 23:47:42 PDT 2026


================
@@ -11,6 +11,25 @@
 
 #include <linux/wait.h>
 
+// <linux/wait.h> defines P_ALL, P_PID, P_PGID, P_PIDFD as numeric macros.
----------------
labath wrote:

That makes sense to me. We can start with the simplest solution and then reevaluate if we hit incompatibilities.

> P.S. it seems like glibc just doesn't handle this case at all: https://godbolt.org/z/rYsWoccch

There are two inclusion orders to consider here. Including linux headers before the libc often does not work, but the opposite often does. In this case, the other order kind of works, but only in C mode (c++ complains about unmatched types).

https://github.com/llvm/llvm-project/pull/227815


More information about the libc-commits mailing list