commit:     eaacbbcc1a5f84fc51c47be720db27853eff1280
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 16 17:48:59 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 18:37:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaacbbcc

dev-ml/core_unix: make it build with ocaml-5.3

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/core_unix/core_unix-0.17.0.ebuild           |  7 +++--
 .../core_unix/files/core_unix-0.17.0-atomic.patch  | 33 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/dev-ml/core_unix/core_unix-0.17.0.ebuild 
b/dev-ml/core_unix/core_unix-0.17.0.ebuild
index cec4ce0037dc..e8f5f1522617 100644
--- a/dev-ml/core_unix/core_unix-0.17.0.ebuild
+++ b/dev-ml/core_unix/core_unix-0.17.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Gentoo Authors
+# Copyright 2023-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -31,7 +31,10 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND=">=dev-ml/dune-3.11"
 
-PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-musl.patch
+       "${FILESDIR}"/${P}-atomic.patch
+)
 
 src_prepare() {
        sed -i \

diff --git a/dev-ml/core_unix/files/core_unix-0.17.0-atomic.patch 
b/dev-ml/core_unix/files/core_unix-0.17.0-atomic.patch
new file mode 100644
index 000000000000..64d9d28e50f5
--- /dev/null
+++ b/dev-ml/core_unix/files/core_unix-0.17.0-atomic.patch
@@ -0,0 +1,33 @@
+From ebce389ac68e098f542e34400e114ac992f415af Mon Sep 17 00:00:00 2001
+From: public-release <[email protected]>
+Date: Tue, 8 Oct 2024 20:31:01 +0100
+Subject: [PATCH] v0.18~preview.130.00+55
+
+---
+ bigstring_unix/src/bigstring_unix_stubs.c     |    7 +-
+
+diff --git a/bigstring_unix/src/bigstring_unix_stubs.c 
b/bigstring_unix/src/bigstring_unix_stubs.c
+index 0d4c7df..785ff10 100644
+--- a/bigstring_unix/src/bigstring_unix_stubs.c
++++ b/bigstring_unix/src/bigstring_unix_stubs.c
+@@ -46,6 +46,10 @@
+ #define bswap_64 bswap64
+ #endif
+ 
++#define CAML_INTERNALS
++#include <caml/io.h>
++#undef CAML_INTERNALS
++
+ #include "ocaml_utils.h"
+ #include "unix_utils.h"
+ #include <caml/socketaddr.h>
+@@ -309,9 +313,6 @@ CAMLprim value 
bigstring_recvfrom_assume_fd_is_nonblocking_stub(value v_sock, va
+ 
+ /* I/O of bigstrings from channels */
+ 
+-#define CAML_INTERNALS
+-#include <caml/io.h>
+-
+ CAMLprim value bigstring_input_stub(value v_min_len, value v_chan, value 
v_pos,
+                                     value v_len, value v_bstr) {
+   CAMLparam2(v_chan, v_bstr);

Reply via email to