Skip to content

Commit

Permalink
fix(spawn): fix headers issues on non-glibc (#10256) (#10258)
Browse files Browse the repository at this point in the history
`caml/signals.h` is not public API; it does not include `caml/config.h`
and so it will not include `signal.h` because it does not know about
`POSIX_SIGNAL`. This issue is visible on musl as "unknown type
sigset_t".

Signed-off-by: Etienne Millon <[email protected]>
Co-authored-by: Etienne Millon <[email protected]>
  • Loading branch information
Leonidas-from-XIV and emillon committed Mar 12, 2024
1 parent 3f4cdaf commit 9dd8bbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions doc/changes/10256.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- fix compilation on non-glibc systems due to `signal.h` not being pulled in
spawn stubs. (#10256, @emillon)
8 changes: 3 additions & 5 deletions vendor/spawn/src/spawn_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
#endif
#endif

/* for [caml_convert_signal_number] */
#include <caml/signals.h>

#undef CAML_INTERNALS

#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <caml/unixsupport.h>
#include <caml/fail.h>

/* for [caml_convert_signal_number]; must come after public caml headers */
#include <caml/signals.h>

#include <errno.h>

#if defined(__APPLE__)
Expand Down
2 changes: 1 addition & 1 deletion vendor/update-spawn.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=d5991f7eb4073c85b440789587936d14b4e0417f
version=6c752122070f377c2607f6969a821f166a43bd5e

set -e -o pipefail

Expand Down

0 comments on commit 9dd8bbb

Please sign in to comment.