mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
Fix build with new ocaml-ocurl (if curl is enabled)
This commit is contained in:
parent
217e0a7831
commit
ee66f04b02
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229809
18
lang/cduce/files/patch-parser_cduce_curl.ml
Normal file
18
lang/cduce/files/patch-parser_cduce_curl.ml
Normal file
@ -0,0 +1,18 @@
|
||||
--- parser/cduce_curl.ml 2008-02-25 11:10:42.000000000 +0100
|
||||
+++ parser/cduce_curl.ml 2009-02-13 16:52:26.000000000 +0100
|
||||
@@ -9,7 +9,14 @@
|
||||
let buff = Buffer.create 4096 in
|
||||
let conn = Curl.init () in
|
||||
Curl.set_url conn s;
|
||||
- Curl.set_writefunction conn (Buffer.add_string buff);
|
||||
+ Curl.set_writefunction conn (
|
||||
+ fun str ->
|
||||
+ try
|
||||
+ Buffer.add_string buff str;
|
||||
+ String.length str
|
||||
+ with
|
||||
+ Failure _ -> 0
|
||||
+ );
|
||||
Curl.perform conn;
|
||||
Buffer.contents buff
|
||||
with Curl.CurlException (code, n, msg) ->
|
Loading…
Reference in New Issue
Block a user