Closed vp1981 closed 2 weeks ago
Hello.
I'm on Archlinux x86_64 with gcc14 and libjpeg (libjpeg-turbo 3.0.2). To compile freerdp from git I have to apply the following patch:
diff --git a/winpr/libwinpr/utils/image.c b/winpr/libwinpr/utils/image.c index c60982571..8cf95df6c 100644 --- a/winpr/libwinpr/utils/image.c +++ b/winpr/libwinpr/utils/image.c @@ -626,7 +626,7 @@ void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width, UINT32 for (size_t x = 0; x < height; x++) { const JDIMENSION offset = x * stride; - const JSAMPLE* coffset = &cdata[offset]; + JSAMPLE* coffset = &cdata[offset]; if (jpeg_write_scanlines(&cinfo, &coffset, 1) != 1) goto fail; }
According to jpeglib.h the second argument of jpeg_write_scanlines shouldn't have const.
jpeglib.h
jpeg_write_scanlines
const
Previously I built freerdp with GCC13 and all was fine, I presume it is related to new GCC14.
yes, API bug of lilbjpeg(aka not const correct), requires explicit casts with newer gcc. pull requests welcome, will be back next week, but no idea when I got time ;)
API
lilbjpeg
Hello.
I'm on Archlinux x86_64 with gcc14 and libjpeg (libjpeg-turbo 3.0.2). To compile freerdp from git I have to apply the following patch:
According to
jpeglib.h
the second argument ofjpeg_write_scanlines
shouldn't haveconst
.Previously I built freerdp with GCC13 and all was fine, I presume it is related to new GCC14.