git: 896072281543 - 2023Q3 - x11-servers/xarcan: unbreak build with clang 16

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sun, 02 Jul 2023 19:14:08 UTC
The branch 2023Q3 has been updated by jbeich:

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

commit 8960722815438dd8d789e02c1088e4c63eac498b
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-07-02 19:01:23 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-07-02 19:13:58 +0000

    x11-servers/xarcan: unbreak build with clang 16
    
    ../hw/kdrive/arcan/arcan.c:1523:21: error: incompatible function pointer types initializing 'present_abort_vblank_ptr' (aka 'void (*)(struct _rrCrtc *, unsigned long, unsigned long)') with an expression of type 'void (void *)' [-Wincompatible-function-pointer-types]
        .abort_vblank = arcanPresentAbortVblank,
                        ^~~~~~~~~~~~~~~~~~~~~~~
    
    Reported by:    pkg-fallout
    
    (cherry picked from commit 109051cff449fa3c24630d0f164c85a88936e035)
---
 x11-servers/xarcan/Makefile            |  2 +-
 x11-servers/xarcan/files/patch-clang16 | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/x11-servers/xarcan/Makefile b/x11-servers/xarcan/Makefile
index fd04cd1417bb..29b5becd63f1 100644
--- a/x11-servers/xarcan/Makefile
+++ b/x11-servers/xarcan/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xarcan
 DISTVERSION=	0.6.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	x11-servers
 
 PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
diff --git a/x11-servers/xarcan/files/patch-clang16 b/x11-servers/xarcan/files/patch-clang16
new file mode 100644
index 000000000000..a86f06fddfb8
--- /dev/null
+++ b/x11-servers/xarcan/files/patch-clang16
@@ -0,0 +1,33 @@
+https://github.com/letoram/xarcan/commit/c6173b4f6682
+
+../hw/kdrive/arcan/arcan.c:1523:21: error: incompatible function pointer types initializing 'present_abort_vblank_ptr' (aka 'void (*)(struct _rrCrtc *, unsigned long, unsigned long)') with an expression of type 'void (void *)' [-Wincompatible-function-pointer-types]
+    .abort_vblank = arcanPresentAbortVblank,
+                    ^~~~~~~~~~~~~~~~~~~~~~~
+../hw/kdrive/arcan/arcan.c:1704:25: warning: incompatible pointer types passing 'miPointerSpriteFuncRec *' (aka 'struct _miPointerSpriteFuncRec *') to parameter of type 'miPointerScreenFuncPtr' (aka 'struct _miPointerScreenFuncRec *') [-Wincompatible-pointer-types]
+                        &ArcanPointerSpriteFuncs, FALSE);
+                        ^~~~~~~~~~~~~~~~~~~~~~~~
+
+--- hw/kdrive/arcan/arcan.c.orig	2020-11-29 15:29:55 UTC
++++ hw/kdrive/arcan/arcan.c
+@@ -1458,11 +1458,9 @@ static int arcanPresentGetUstMsc(RRCrtcPtr crtc, CARD6
+     return 0;
+ }
+ 
+-static void arcanPresentAbortVblank(void *data)
++static void arcanPresentAbortVblank(RRCrtcPtr crtc, uint64_t evid, uint64_t msc)
+ {
+-    struct ms_present_vblank_event *event = data;
+     trace("present:vblank abort");
+-    free(event);
+ }
+ 
+ static int arcanPresentQueueVblank(RRCrtcPtr crtc, uint64_t evid, uint64_t msc)
+@@ -1701,7 +1699,7 @@ arcanCursorInit(ScreenPtr screen)
+ 
+     miPointerInitialize(screen,
+                         &ArcanPointerSpriteFuncs,
+-                        &ArcanPointerSpriteFuncs, FALSE);
++                        &ArcanPointerScreenFuncs, FALSE);
+ 
+     return TRUE;
+ }