Closed hejob closed 3 years ago
Fixes #37
Great catch, thanks! I'm totally confused as to why I ever had the opjMinusOne64
variable - it was never in use in the code as far as I can tell, even digging through the entire history of the project.
I should have this merged shortly.
In src/openjpeg/image_stream.go, the value returned by opjStreamRead is opjMinusOne64 (type OPJ_UINT64), which seemingly mismatches the return type OPJ_SIZE_T under some compiling systems.
The compilation fails in local golang environment under MacOS Catalina with brew module openjpeg installed and used as a library. The problem is fixed after changing return value to opjMinusOneSizeT.
I think the reason it goes well in docker environment (both alpine and golang) is maybe that the two types references to the same type in ibopenjp2-7-dev. But in my MacOS local environment, the two types confirmed are u_longlong and u_long respectively.