www/ocaml-curl: fix build with recent ocaml
This commit is contained in:
parent
c23868ad90
commit
8502de40ac
2 changed files with 24 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.2 2015/11/04 02:46:59 agc Exp $
|
||||
$NetBSD: distinfo,v 1.3 2021/08/15 06:10:45 dholland Exp $
|
||||
|
||||
SHA1 (ocurl-0.5.3.tgz) = d074946ad61663aaed8a95bcdaee5bb6849fa163
|
||||
RMD160 (ocurl-0.5.3.tgz) = 588c88adcf6d304f3a1acc8d8fef53c16d4cadcf
|
||||
SHA512 (ocurl-0.5.3.tgz) = 29ec901bd47ab0a26123fabdd4a447a30f8170c462aed7079c634bc6993b6e9140eb2a4d42d3d0b2aa65666dbe8a4ff7082ed08daf2e1605da0f552cb5802802
|
||||
Size (ocurl-0.5.3.tgz) = 87849 bytes
|
||||
SHA1 (patch-Makefile.in) = 2dcf2d6f8ccb12b15dea8cf27cf31e13bbfed8be
|
||||
SHA1 (patch-examples_oput.ml) = 0c8c02813703bece478188ab4bea599f45f106cf
|
||||
|
|
22
www/ocaml-curl/patches/patch-examples_oput.ml
Normal file
22
www/ocaml-curl/patches/patch-examples_oput.ml
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-examples_oput.ml,v 1.1 2021/08/15 06:10:45 dholland Exp $
|
||||
|
||||
Fix build with recent ocaml.
|
||||
|
||||
--- examples/oput.ml~ 2008-06-23 04:22:56.000000000 +0000
|
||||
+++ examples/oput.ml
|
||||
@@ -7,13 +7,13 @@
|
||||
let counter = ref 0
|
||||
|
||||
let reader file maxBytes =
|
||||
- let buffer = String.create maxBytes in
|
||||
+ let buffer = Bytes.create maxBytes in
|
||||
let readBytes = input file buffer 0 maxBytes in
|
||||
if readBytes = 0 then ""
|
||||
else
|
||||
begin
|
||||
counter := !counter + readBytes;
|
||||
- String.sub buffer 0 readBytes
|
||||
+ Bytes.to_string (Bytes.sub buffer 0 readBytes)
|
||||
end
|
||||
|
||||
let _ =
|
Loading…
Reference in a new issue