git: a68bb8c9a092 - main - x11-toolkits/gtk-sharp20: fix build with clang 15

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 16 Jan 2023 19:05:22 UTC
The branch main has been updated by dim (src committer):

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

commit a68bb8c9a0929cbe02e99640479b728b4b916f31
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-01-07 14:55:25 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-01-16 19:04:47 +0000

    x11-toolkits/gtk-sharp20: fix build with clang 15
    
    During an exp-run for llvm 15 (see bug 265425), it turned out that
    x11-toolkits/gtk-sharp20 failed to build with clang 15:
    
      windowmanager.c:113:12: error: incompatible integer to pointer conversion assigning to 'gpointer' (aka 'void *') from 'long' [-Wint-conversion]
                      list [i] = data [i];
                               ^ ~~~~~~~~
    
    This is because gdk_property_get() always returns an array of longs, and
    these have to be cast to whatever the desired outcome type is.
    
    PR:             268812
    Approved by:    portmgr (tcberner)
    MFH:            2023Q1
---
 x11-toolkits/gtk-sharp20/files/patch-gdk_glue_windowmanager.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/x11-toolkits/gtk-sharp20/files/patch-gdk_glue_windowmanager.c b/x11-toolkits/gtk-sharp20/files/patch-gdk_glue_windowmanager.c
new file mode 100644
index 000000000000..2550cba46750
--- /dev/null
+++ b/x11-toolkits/gtk-sharp20/files/patch-gdk_glue_windowmanager.c
@@ -0,0 +1,11 @@
+--- gdk/glue/windowmanager.c.orig	2016-09-22 10:17:18 UTC
++++ gdk/glue/windowmanager.c
+@@ -110,7 +110,7 @@ gtksharp_get_gdk_net_client_list (int *count)
+ 	list = g_malloc (*count * sizeof (gpointer));
+ 	/* Put all of the windows into a GList to return */
+ 	for (i = 0; i < *count; i ++) {
+-		list [i] = data [i];
++		list [i] = (gpointer) data [i];
+ 		g_message ("WinID: %d", list [i]);
+ 	}
+