backend-rdp: fix build with freerdp 3.15.0

Every .c file in RDP-backend hits this:

cc -Ilibweston/backend-rdp/rdp-backend.so.p -Ilibweston/backend-rdp
-I../../git/weston/libweston/backend-rdp -I. -I../../git/weston
-Iinclude -I../../git/weston/include -Ilibweston
-I../../git/weston/libweston -I/home/pq/local/include
-I/usr/include/pixman-1
-I/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/
-I/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/winpr3
-I/usr/include/libdrm -fdiagnostics-color=always
-fsanitize=address,undefined -fno-omit-frame-pointer
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror
-std=gnu11 -O0 -g -Wmissing-prototypes -Wno-unused-parameter
-Wno-shift-negative-value -Wno-missing-field-initializers -Wno-pedantic
-Wundef -fvisibility=hidden -Wmissing-prototypes -Wno-unused-parameter
-Wno-shift-negative-value -Wno-missing-field-initializers -Wno-pedantic
-Wundef -fvisibility=hidden -fPIC -MD -MQ
libweston/backend-rdp/rdp-backend.so.p/rdp.c.o -MF
libweston/backend-rdp/rdp-backend.so.p/rdp.c.o.d -o
libweston/backend-rdp/rdp-backend.so.p/rdp.c.o -c
../../git/weston/libweston/backend-rdp/rdp.c

In file included from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/client/rdpgfx.h:28,
                 from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/gdi/gdi.h:34,
                 from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/freerdp.h:35,
                 from ../../git/weston/libweston/backend-rdp/rdp.h:32,
                 from ../../git/weston/libweston/backend-rdp/rdp.c:37:
/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/codecs.h:93:9: error: ‘codecs_free’ is deprecated: [since 3.6.0] Use freerdp_client_codecs_free [-Werror=deprecated-declarations]
   93 |         WINPR_DEPRECATED_VAR("[since 3.6.0] Use freerdp_client_codecs_new",
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/winpr3/winpr/winpr.h:22,
                 from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/winpr3/winpr/stream.h:26,
                 from /usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/freerdp.h:25:
/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/freerdp3/freerdp/codecs.h:91:47: note: declared here
   91 |                              FREERDP_API void codecs_free(rdpCodecs* codecs));
      |                                               ^~~~~~~~~~~
/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/winpr3/winpr/platform.h:497:41: note: in definition of macro ‘WINPR_DEPRECATED_VAR’
  497 | #define WINPR_DEPRECATED_VAR(text, obj) obj __attribute__((deprecated(text)))
      |                                         ^~~
cc1: all warnings being treated as errors

Looks like there is a magic define that fixes this, as we are not using
the deprecated things to begin with.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2025-06-23 15:51:25 +03:00 committed by Marius Vlad
parent c8f71ff503
commit 0a76b639fe

View file

@ -9,6 +9,7 @@ dep_frdp2 = dependency('freerdp2', version: '>= 2.3.0', required: false)
if dep_frdp3.found()
config_h.set('USE_FREERDP_VERSION', '3')
config_h.set('WITHOUT_FREERDP_3x_DEPRECATED', '1')
dep_frdp = dep_frdp3
dep_frdp_server = dependency('freerdp-server3', version: '>= 3.0.0', required: false)
if not dep_frdp_server.found()