HomeFreeBSD

cross-build: Fix bmake bootstrap with glibc 2.34

Description

cross-build: Fix bmake bootstrap with glibc 2.34

As of glibc 2.34, our unistd.h wrapper's inclusion of stdlib.h exposes
fragility in glibc's sys/wait.h and corresponding part of stdlib.h,
leading to "error: use of undeclared identifier 'WNOHANG'" and similar
errors when bootstrapping bmake.

Work around this by wrapping sys/wait.h to force stdlib.h's inclusion
first before it's implicitly included during the problematic window in
sys/wait.h.

MFC after: 1 week

Details

Provenance
jrtc27Authored on Dec 15 2021, 5:52 AM
Parents
rG6a2b72bf1a88: Remove test-includes build
Branches
Unknown
Tags
Unknown