sysprof/0023-sysprof-live-unwinder-fix-source-func-prototype.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

2024-11-27 17:36:40 +00:00
From b3c6e9d346d6c3a4a55d0438d43f6872f5821937 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Tue, 12 Nov 2024 14:45:57 -0800
2024-11-27 17:36:40 +00:00
Subject: [PATCH 23/33] sysprof-live-unwinder: fix source func prototype
While this looks like a GSource, the implementation type requires that
it actually be a GUnixFDSourceFunc.
---
src/sysprof-live-unwinder/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/sysprof-live-unwinder/main.c b/src/sysprof-live-unwinder/main.c
index 9e2733ae..e14eaf6c 100644
--- a/src/sysprof-live-unwinder/main.c
+++ b/src/sysprof-live-unwinder/main.c
@@ -642,7 +642,9 @@ bump_to_max_fd_limit (void)
}
static gboolean
-exit_callback (gpointer user_data)
+exit_callback (int fd,
+ GIOCondition condition,
+ gpointer user_data)
{
g_main_loop_quit (user_data);
return G_SOURCE_REMOVE;
@@ -738,7 +740,7 @@ Examples:\n\
g_autoptr(GSource) exit_source = g_unix_fd_source_new (event_fd, G_IO_IN);
g_source_set_callback (exit_source,
- exit_callback,
+ (GSourceFunc)exit_callback,
g_main_loop_ref (main_loop),
(GDestroyNotify) g_main_loop_unref);
g_source_attach (exit_source, NULL);
--
2.45.2