upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / devil / trunk / jasper.patch
blobf1f048a8b250faebcc20c5de592ca2ef8dbd480f
1 diff -Nru DevIL/DevIL/src-IL/src/il_jp2.cpp DevILb/DevIL/src-IL/src/il_jp2.cpp
2 --- DevIL/DevIL/src-IL/src/il_jp2.cpp 2017-01-02 01:03:56.000000000 +0100
3 +++ DevILb/DevIL/src-IL/src/il_jp2.cpp 2022-05-13 09:10:05.934188618 +0200
4 @@ -313,14 +313,32 @@
9 +// Hack to compile against different versions of Jasper which expect
10 +// slightly different function types for their callbacks. The defined()
11 +// checks are just looking for sybols that happen to have arrived around
12 +// the same time as the API change, so no reason they won't break in the
13 +// future :-( Hopefully by the time it does nobody will care about pre-2.0.20
14 +// versions of jasper
15 +//
16 +// see: https://github.com/OSGeo/gdal/commit/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334
17 +// https://github.com/DentonW/DevIL/issues/90
18 +#if defined(PRIjas_seqent)
19 +static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt)
20 +#else
21 static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt)
22 +#endif
24 obj;
25 return iread(buf, 1, cnt);
28 +#if defined(JAS_INCLUDE_JP2_CODEC)
29 +static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt)
30 +#elif defined(PRIjas_seqent)
31 +static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, unsigned cnt)
32 +#else
33 static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt)
34 +#endif
36 obj;
37 return iwrite(buf, 1, cnt);