freerdp: use gnu17 to allow building with gcc-15
PATCH 1/2 freerdp: use gnu17 to allow building with gcc-15
From: Martin Jansa <[email protected]>
It was fixed in freerdp3 with
https://github.com/FreeRDP/FreeRDP/pull/10553
but it doesn't apply easily in freerdp2, use gnu17 to avoid:
http://errors.yoctoproject.org/Errors/Details/852862/
TOPDIR/tmp/work/core2-64-oe-linux/freerdp/2.11.7/build/channels/client/tables.c:124:25: error: initialization of 'UINT (*)(void)' {aka 'unsigned int (*)(void)'} from incompatible pointer type 'UINT (*)(void *)' {aka 'unsigned int (*)(void *)'} [-Wincompatible-pointer-types]
124 | { "libusb", "", libusb_freerdp_urbdrc_client_subsystem_entry },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-oe/recipes-support/freerdp/freerdp_2.11.7.bb +4 -0
@@ -95,3 +95,7 @@ python populate_packages:prepend () { } CVE_STATUS[CVE-2024-32662] = "fixed-version: 2.x is not affected, bug was introduced in 3.0.0" + +# avoid http://errors.yoctoproject.org/Errors/Details/852862/ +# fixed in freerdp3 with https://github.com/FreeRDP/FreeRDP/pull/10553 +CFLAGS += "-std=gnu17"
PATCH 2/2 libiodbc: use gnu17 and ignore incompatible-pointer-types to allow building with gcc-15
From: Martin Jansa <[email protected]>
A fix was sent in:
https://lists.openembedded.org/g/openembedded-devel/message/116537
but it causes issues with clang as well as older gcc as reported on ML and also in upstream PR:
https://github.com/openlink/iODBC/pull/111
Use gnu17 until this is properly resolved to avoid:
http://errors.yoctoproject.org/Errors/Details/852861/
In file included from ../../libiodbc-3.52.16/iodbc/execute.c:94:../../libiodbc-3.52.16/iodbc/execute.c: In function '_ReBindParam':../../libiodbc-3.52.16/iodbc/execute.c:643:49: error: too many arguments to function 'hproc3'; expected 0, have 8
643 | CALL_DRIVER (pstmt->hdbc, pstmt, retcode, hproc3,
| ^~~~~~
http://errors.yoctoproject.org/Errors/Details/853276/../../libiodbc-3.52.16/iodbcinst/unicode.c: In function 'dm_AtoUW':../../libiodbc-3.52.16/iodbcinst/unicode.c:1565:16: error: initialization of 'ucs4_t *' {aka 'unsigned int *'} from incompatible pointer type 'wchar_t *' {aka 'long int *'} [-Wincompatible-pointer-types]
1565 | ucs4_t *us = dest;
| ^~~~
--- meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb | 6 ++++++ 1 file changed, 6 insertions(+)
meta-oe/recipes-support/libiodbc/libiodbc_3.52.16.bb +6 -0
@@ -31,3 +31,9 @@ EXTRA_OECONF += " --prefix=/usr/local \ inherit multilib_script MULTILIB_SCRIPTS = "${PN}:${bindir}/iodbc-config" + +# avoid http://errors.yoctoproject.org/Errors/Details/852861/ +CFLAGS += "-std=gnu17" +# http://errors.yoctoproject.org/Errors/Details/853276/ +# libiodbc-3.52.16/iodbcinst/unicode.c:1565:16: error: initialization of 'ucs4_t *' {aka 'unsigned int *'} from incompatible pointer type 'wchar_t *' {aka 'long int *'} [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types"