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

Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2025-03-16 18:48:59 +01:00
parent d3714b3e22
commit eaacbbcc1a
2 changed files with 38 additions and 2 deletions

View File

@@ -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 \

View File

@@ -0,0 +1,33 @@
From ebce389ac68e098f542e34400e114ac992f415af Mon Sep 17 00:00:00 2001
From: public-release <as-public-release@janestreet.com>
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);