From 0a5a917c3338bfca517588252e1e4799d4d08360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 9 Nov 2016 11:51:50 +0100 Subject: [PATCH] Used upstream fix for OCaml 4.04 --- brltty-ocaml-4-04-fix.patch | 44 +++++++++++++++++++++++++++++-------- brltty.spec | 5 ++++- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/brltty-ocaml-4-04-fix.patch b/brltty-ocaml-4-04-fix.patch index 3f16fed..72cec46 100644 --- a/brltty-ocaml-4-04-fix.patch +++ b/brltty-ocaml-4-04-fix.patch @@ -1,18 +1,44 @@ ---- a/Bindings/OCaml/brlapi_stubs.c -+++ a/Bindings/OCaml/brlapi_stubs.c -@@ -144,6 +144,7 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError) - /* Raises the Brlapi_error exception */ +From 05913940aa6c5e3cca9c2468f5fcd2d884ec6ab1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sh=C3=A9rab?= +Date: Tue, 8 Nov 2016 17:39:14 +0100 +Subject: [PATCH] Make OCaml API bindings compile with OCaml 4.04.0. + +--- + Bindings/OCaml/brlapi_stubs.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Bindings/OCaml/brlapi_stubs.c b/Bindings/OCaml/brlapi_stubs.c +index 1e66f9e..aabdc14 100644 +--- a/Bindings/OCaml/brlapi_stubs.c ++++ b/Bindings/OCaml/brlapi_stubs.c +@@ -145,12 +145,14 @@ CAMLprim value brlapiml_errorCode_of_error(value camlError) static void raise_brlapi_error(void) { -+ CAMLparam0(); static value *exception = NULL; ++ CAMLparam0(); CAMLlocal1(res); if (exception==NULL) exception = caml_named_value("Brlapi_error"); -@@ -157,6 +158,7 @@ static void raise_brlapi_error(void) - /* Raises Brlapi_exception */ - static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t type, const void *packet, size_t size) + res = caml_alloc(2,0); + Store_field(res, 0, *exception); + Store_field(res, 1, constrCamlError(&brlapi_error)); + caml_raise(res); ++ CAMLreturn0; + } + + /* Function : raise_brlapi_exception */ +@@ -159,6 +161,7 @@ static void BRLAPI_STDCALL raise_brlapi_exception(int err, brlapi_packetType_t t { -+ CAMLparam0(); static value *exception = NULL; int i; ++ CAMLparam0(); CAMLlocal2(str, res); + str = caml_alloc_string(size); + for (i=0; i - 5.4-5 +- Used upstream fix for OCaml 4.04 + * Tue Nov 08 2016 Richard W.M. Jones - 5.4-4 - Add fix for OCaml 4.04 (thanks: Jaroslav Škarvada).