Skip to content

fix(update): include <sys/wait.h> for WIFEXITED/WEXITSTATUS (Linux build)#209

Merged
click0 merged 1 commit into
mainfrom
claude/analyze-test-coverage-nCOJW
May 26, 2026
Merged

fix(update): include <sys/wait.h> for WIFEXITED/WEXITSTATUS (Linux build)#209
click0 merged 1 commit into
mainfrom
claude/analyze-test-coverage-nCOJW

Conversation

@click0
Copy link
Copy Markdown
Owner

@click0 click0 commented May 25, 2026

What

lib/update.cpp uses the wait-status macros WIFEXITED / WEXITSTATUS but relied on a transitive include that exists on FreeBSD yet not on Linux, breaking the Linux build:

lib/update.cpp:76:12: error: use of undeclared identifier 'WIFEXITED'
lib/update.cpp:76:32: error: use of undeclared identifier 'WEXITSTATUS'

Fix: add the explicit POSIX #include <sys/wait.h>, placed in the system-header group exactly as every other user of these macros in lib/ already does (run.cpp, jail_query.cpp, run_jail.cpp, util.cpp, zfs_ops.cpp, stack.cpp, console.cpp).

Verification

  • smoke test: WIFEXITED/WEXITSTATUS resolve via <sys/wait.h>
  • full compile of update.cpp end-to-end (with a stub rang.hpp, since the vendored header is absent in the Linux sandbox) ✅

2-line change, no behavior change.

https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK


Generated by Claude Code

lib/update.cpp used the wait-status macros but relied on a
transitive include that exists on FreeBSD but not on Linux,
breaking the Linux build. Add the explicit POSIX include, as
every other user of these macros in lib/ already does.

https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
@click0 click0 merged commit 6ccab8f into main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants