fix: include sys/wait.h on NetBSD in lev_stubs.c#14512
Merged
Merged
Conversation
13d55fa to
1619ed3
Compare
NetBSD needs the same header as FreeBSD and OpenBSD for W* macros (WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, WTERMSIG). Patch suggested by Thomas Klausner (0-wiz-0) in ocaml#14484. Signed-off-by: Ali Caglayan <alizter@gmail.com>
1619ed3 to
0e85346
Compare
rgrinberg
approved these changes
May 13, 2026
rgrinberg
left a comment
Member
There was a problem hiding this comment.
Looks OK. This CI should only be advisory for maintainers. We do not promise to support netbsd
Leonidas-from-XIV
pushed a commit
to Leonidas-from-XIV/dune
that referenced
this pull request
May 14, 2026
Fixes ocaml#14484. NetBSD needs the same `<sys/wait.h>` include as FreeBSD and OpenBSD so that the `WIFEXITED`, `WEXITSTATUS`, `WIFSTOPPED`, `WSTOPSIG` and `WTERMSIG` macros are available when building `lev_stubs.c`. Without it the bootstrap fails at link time on NetBSD with undefined references to these symbols. ``` ld: /home/runner/work/dune/dune/_boot/src/lev/src/lev_stubs.c:515: undefined reference to `WIFEXITED' ld: …:517: undefined reference to `WEXITSTATUS' ld: …:518: undefined reference to `WIFSTOPPED' ld: …:525: undefined reference to `WTERMSIG' ld: …:521: undefined reference to `WSTOPSIG' Error: Error during linking (exit code 1) ``` Failing CI run (before the fix): https://github.com/Alizter/dune/actions/runs/25815321578/job/75842142913?pr=9#step:3:403 Passing NetBSD x86-64 job on this PR (with the fix): https://github.com/ocaml/dune/actions/runs/25816678888/job/75846908855 Patch suggested by @0-wiz-0 in ocaml#14484. Signed-off-by: Marek Kubica <marek@tarides.com>
shonfeder
added a commit
that referenced
this pull request
May 14, 2026
shonfeder
added a commit
to ocaml/opam-repository
that referenced
this pull request
May 19, 2026
CHANGES:
### Fixed
- Fix the `menhir` opam dependency injection introduced in 3.23. Dune
now only fills in the lower bound `{>= "20180523"}` on an existing
user-declared `menhir` dependency; it no longer adds `menhir` as a
new dependency to packages that did not declare it themselves.
(ocaml/dune#14434, fixes ocaml/dune#14428, @robinbb)
- Gate the `dune` version-bound deduplication in generated opam files
(introduced in 3.23) on `(lang dune 3.23)`. Projects at earlier lang
versions get the prior `And [...]` shape — e.g.
`{>= "3.17" & >= "3.20"}` — restoring 3.22 behaviour and avoiding a
silent change to opam output on dune-binary upgrade. (ocaml/dune#14436,
@robinbb)
- Preserve library order when building a shared jsoo standalone runtime.
(ocaml/dune#14438, @vouillon)
- Fix the fallback to the secondary compiler, allowing recovering of support for
packages with upper bounds on OCaml less than 4.14. Packages depending on dune
3.23.1 or later and with an upper bound on the OCaml compiler that is less
than 4.14, will now be able to use the latest dune, but dune will be built
with the secondary compiler at version 4.14. (ocaml/dune#14443, @Alizter)
- Fix the bootstrap on NetBSD by including `<sys/wait.h>` in `lev_stubs.c`,
matching the existing FreeBSD/OpenBSD guard.
(ocaml/dune#14512, fixes ocaml/dune#14484, @0-wiz-0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14484.
NetBSD needs the same
<sys/wait.h>include as FreeBSD and OpenBSD so that theWIFEXITED,WEXITSTATUS,WIFSTOPPED,WSTOPSIGandWTERMSIGmacros are available when buildinglev_stubs.c. Without it the bootstrap fails at link time on NetBSD with undefined references to these symbols.Failing CI run (before the fix): https://github.com/Alizter/dune/actions/runs/25815321578/job/75842142913?pr=9#step:3:403
Passing NetBSD x86-64 job on this PR (with the fix): https://github.com/ocaml/dune/actions/runs/25816678888/job/75846908855
Patch suggested by @0-wiz-0 in #14484.