Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/66c904c42f6ce7e4b378e5b2321d3c4c4a92bbef/testing/devil/fix_mismatching_signatures.patch

This fixes mismatching function signatures when using function pointers to
iJp2_file_read and iJp2_file_write in jas_stream_opts_t.

--- a/DevIL/src-IL/src/il_jp2.cpp
+++ b/DevIL/src-IL/src/il_jp2.cpp
@@ -314,13 +314,13 @@
 
 
 
-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt)
+static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt)
 {
 	obj;
 	return iread(buf, 1, cnt);
 }
 
-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt)
+static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt)
 {
 	obj;
 	return iwrite(buf, 1, cnt);
