git: a6ac8b77340e - main - net/freerdp: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' on 14+

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Tue, 12 Sep 2023 11:37:45 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6ac8b77340eee1d5fdf24a282a9063dd3f9ac11

commit a6ac8b77340eee1d5fdf24a282a9063dd3f9ac11
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-09-12 11:31:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-09-12 11:31:20 +0000

    net/freerdp: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' on 14+
    
    clang 16+ (maybe 15 too) build error:
    /usr/ports/net/freerdp/work/freerdp-2.11.1/client/Wayland/wlfreerdp.c:637:19: error: incompatible function pointer types assigning to 'OBJECT_NEW_FN' (aka 'void *(*)(void *)') from 'void *(const void *)' [-Wincompatible-function-pointer-types]
            obj->fnObjectNew = uwac_event_clone;
                             ^ ~~~~~~~~~~~~~~~~
    
    PR:             273731
    Approved by:    arrowd (mentor, implicit)
    Obtained from:  https://github.com/FreeRDP/FreeRDP/pull/9373
---
 net/freerdp/files/patch-client_Wayland_wlfreerdp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/freerdp/files/patch-client_Wayland_wlfreerdp.c b/net/freerdp/files/patch-client_Wayland_wlfreerdp.c
new file mode 100644
index 000000000000..0b7fd973f414
--- /dev/null
+++ b/net/freerdp/files/patch-client_Wayland_wlfreerdp.c
@@ -0,0 +1,11 @@
+--- client/Wayland/wlfreerdp.c.orig
++++ client/Wayland/wlfreerdp.c
+@@ -587,7 +587,7 @@ static void wlf_client_free(freerdp* instance, rdpContext* context)
+ 	DeleteCriticalSection(&wlf->critical);
+ }
+ 
+-static void* uwac_event_clone(const void* val)
++static void* uwac_event_clone(void* val)
+ {
+ 	UwacEvent* copy;
+ 	const UwacEvent* ev = (const UwacEvent*)val;