aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-react/fix-safe-string.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-10 01:46:45 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-10 02:17:26 +0100
commit6e0bf7f5a3070c783ac56f4d005d83b3830aaeb8 (patch)
tree2c14ff7e74f4ce43bcf7b0e58c03da029f918ed5 /testing/ocaml-react/fix-safe-string.patch
parente62a10dcc80807932ea8b7f78ebc70117a5be640 (diff)
downloadaports-6e0bf7f5a3070c783ac56f4d005d83b3830aaeb8.tar.bz2
aports-6e0bf7f5a3070c783ac56f4d005d83b3830aaeb8.tar.xz
testing/ocaml-react: rebuild with ocaml 4.06.1, fix depends
Diffstat (limited to 'testing/ocaml-react/fix-safe-string.patch')
-rw-r--r--testing/ocaml-react/fix-safe-string.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/ocaml-react/fix-safe-string.patch b/testing/ocaml-react/fix-safe-string.patch
new file mode 100644
index 0000000000..5a9ee3e2a5
--- /dev/null
+++ b/testing/ocaml-react/fix-safe-string.patch
@@ -0,0 +1,18 @@
+Fix for compatibility with ocaml >=4.06
+
+Patch-Source: https://src.fedoraproject.org/rpms/ocaml-react/blob/f28/f/react-1.2.0-safe-string-fix.patch
+
+--- a/test/breakout.ml
++++ b/test/breakout.ml
+@@ -136,9 +136,9 @@
+ let time, send_time = E.create ()
+ let key, send_key = E.create ()
+ let gather () = (* updates primitive events. *)
+- let c = " " in
++ let c = Bytes.of_string " " in
+ let i = Unix.stdin in
+- let input_char i = ignore (Unix.read i c 0 1); c.[0] in
++ let input_char i = ignore (Unix.read i c 0 1); Bytes.get c 0 in
+ let dt = 0.1 in
+ while true do
+ if Unix.select [i] [] [] dt = ([i], [], []) then send_key (input_char i);