pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/ocaml-dune
Module Name: pkgsrc
Committed By: jperkin
Date: Tue Apr 14 09:15:00 UTC 2026
Modified Files:
pkgsrc/devel/ocaml-dune: distinfo
Added Files:
pkgsrc/devel/ocaml-dune/patches:
patch-otherlibs_stdune_src_wait4__stubs.c
patch-vendor_spawn_src_spawn__stubs.c
Log Message:
ocaml-dune: Fix build on SunOS.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/ocaml-dune/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/ocaml-dune/patches/patch-otherlibs_stdune_src_wait4__stubs.c \
pkgsrc/devel/ocaml-dune/patches/patch-vendor_spawn_src_spawn__stubs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/ocaml-dune/distinfo
diff -u pkgsrc/devel/ocaml-dune/distinfo:1.22 pkgsrc/devel/ocaml-dune/distinfo:1.23
--- pkgsrc/devel/ocaml-dune/distinfo:1.22 Mon Apr 13 12:59:57 2026
+++ pkgsrc/devel/ocaml-dune/distinfo Tue Apr 14 09:15:00 2026
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.22 2026/04/13 12:59:57 wiz Exp $
+$NetBSD: distinfo,v 1.23 2026/04/14 09:15:00 jperkin Exp $
BLAKE2s (dune-3.22.2.tar.gz) = 9f61bc48f5bcb1176499ae4fac491d989689680d71f79b605355eb533aa424c0
SHA512 (dune-3.22.2.tar.gz) = 1cdde88dcb0d738287c08afa2870cdc1a9850952b5fb49c834a20f90335b71a8ec129a01639b5c56926b9bcbd716aebecfe6d33d2440839850ebacc81615308c
Size (dune-3.22.2.tar.gz) = 3571784 bytes
SHA1 (patch-otherlibs_configurator_src_v1.ml) = 74ddbf037c59ed81eb858042463fa5016027d9b8
SHA1 (patch-otherlibs_stdune_src_readdir.c) = 640249f86e95d43dcd672fb61eb146af1434a11d
+SHA1 (patch-otherlibs_stdune_src_wait4__stubs.c) = 3294a78f451b450ba0614803c68ba340901cc8c7
SHA1 (patch-vendor_notty_src-unix_native_winsize.c) = d970c142e55e217477a54f11801e2d2365e12e7f
SHA1 (patch-vendor_ocaml-lmdb_mdb.c) = 9c46b39da5dd5bb9db7501a7818edf52503cbc1a
+SHA1 (patch-vendor_spawn_src_spawn__stubs.c) = be446f444daae8cb97a500d6491ac9f92eb9c446
Added files:
Index: pkgsrc/devel/ocaml-dune/patches/patch-otherlibs_stdune_src_wait4__stubs.c
diff -u /dev/null pkgsrc/devel/ocaml-dune/patches/patch-otherlibs_stdune_src_wait4__stubs.c:1.1
--- /dev/null Tue Apr 14 09:15:00 2026
+++ pkgsrc/devel/ocaml-dune/patches/patch-otherlibs_stdune_src_wait4__stubs.c Tue Apr 14 09:15:00 2026
@@ -0,0 +1,22 @@
+$NetBSD: patch-otherlibs_stdune_src_wait4__stubs.c,v 1.1 2026/04/14 09:15:00 jperkin Exp $
+
+Handle wait4() quirk on SunOS. Reported upstream as
+https://github.com/ocaml/dune/issues/14182
+
+--- otherlibs/stdune/src/wait4_stubs.c.orig 2026-04-01 17:26:23.000000000 +0000
++++ otherlibs/stdune/src/wait4_stubs.c
+@@ -76,8 +76,14 @@ value dune_wait4(value v_pid, value flag
+ struct rusage ru;
+
+ caml_enter_blocking_section();
++ // On Solaris/illumos, wait4(-1, ...) semantics are different, so in the
++ // pid == -1 case use 0 and effectively act the same as wait3().
++#if defined(__sun)
++ pid = wait4(pid == -1 ? 0 : pid, &status, cv_flags, &ru);
++#else
+ // returns the pid of the terminated process, or -1 on error
+ pid = wait4(pid, &status, cv_flags, &ru);
++#endif
+ int wait_errno = errno;
+ time_ns = dune_clock_gettime_ns();
+ caml_leave_blocking_section();
Index: pkgsrc/devel/ocaml-dune/patches/patch-vendor_spawn_src_spawn__stubs.c
diff -u /dev/null pkgsrc/devel/ocaml-dune/patches/patch-vendor_spawn_src_spawn__stubs.c:1.1
--- /dev/null Tue Apr 14 09:15:00 2026
+++ pkgsrc/devel/ocaml-dune/patches/patch-vendor_spawn_src_spawn__stubs.c Tue Apr 14 09:15:00 2026
@@ -0,0 +1,19 @@
+$NetBSD: patch-vendor_spawn_src_spawn__stubs.c,v 1.1 2026/04/14 09:15:00 jperkin Exp $
+
+Retry read() on EINTR. Reported upstream as
+https://github.com/ocaml/dune/issues/14182
+
+--- vendor/spawn/src/spawn_stubs.c.orig 2026-04-01 17:26:23.000000000 +0000
++++ vendor/spawn/src/spawn_stubs.c
+@@ -750,7 +750,10 @@ CAMLprim value spawn_unix(value v_env,
+ got_error = 1;
+ set_error(&failure, errno_after_forking, "vfork", NOTHING);
+ } else {
+- intnat res = read(result_pipe[0], &failure, sizeof(failure));
++ intnat res;
++ do {
++ res = read(result_pipe[0], &failure, sizeof(failure));
++ } while (res == -1 && errno == EINTR);
+ /* If the sub-process exec successfully, the write end of the
+ error pipe is closed (as it has the [O_CLOEXEC] flag set) and
+ [read] returns [0].
Home |
Main Index |
Thread Index |
Old Index