xfce4-panel: fix redefinition of autoptr cleanup for XfceTitledDialog

Newer libxfce4ui defines the XfceTitledDialog autoptr cleanup functions
the panel's guarded redefinition is redundant and breaks the build
under GCC 16. Drop it (backport of upstream 3ac941fc).

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-06-24 09:58:24 -07:00
parent f7bd7b11ba
commit 4278aeace7
2 changed files with 43 additions and 0 deletions
@@ -0,0 +1,42 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 23 Jun 2026 00:00:00 +0000
Subject: [PATCH] panel: tic-tac-toe: Remove wrong autoptr define guard
panel-tic-tac-toe.h guarded its own
G_DEFINE_AUTOPTR_CLEANUP_FUNC (XfceTitledDialog, g_object_unref) with
"#ifndef glib_autoptr_clear_XfceTitledDialog". That macro is never
defined: G_DEFINE_AUTOPTR_CLEANUP_FUNC emits static inline functions, not
a glib_autoptr_clear_* macro, so the guard is always true.
libxfce4ui (>= 4.21.8) now defines the XfceTitledDialog autoptr cleanup
functions itself in xfce-titled-dialog.h. Because the guard never
triggers, the panel header redefines the same static inline cleanup
functions, which is a hard error with GCC 16 / recent clang:
error: redefinition of 'glib_autoptr_clear_XfceTitledDialog'
Drop the redundant definition entirely; rely on libxfce4ui to provide it.
Upstream-Status: Backport [https://gitlab.xfce.org/xfce/xfce4-panel/-/commit/3ac941fc083fee5e56b0f3e509d6f6b461b48e39]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
panel/panel-tic-tac-toe.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/panel/panel-tic-tac-toe.h b/panel/panel-tic-tac-toe.h
index 1111111..2222222 100644
--- a/panel/panel-tic-tac-toe.h
+++ b/panel/panel-tic-tac-toe.h
@@ -24,9 +24,6 @@ G_BEGIN_DECLS
G_BEGIN_DECLS
#define PANEL_TYPE_TIC_TAC_TOE (panel_tic_tac_toe_get_type ())
-#ifndef glib_autoptr_clear_XfceTitledDialog
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (XfceTitledDialog, g_object_unref)
-#endif
G_DECLARE_FINAL_TYPE (PanelTicTacToe, panel_tic_tac_toe, PANEL, TIC_TAC_TOE, XfceTitledDialog)
void
--
2.43.0
@@ -17,6 +17,7 @@ SRC_URI += " \
file://0001-build-Do-not-display-full-path-in-generated-headers.patch \
file://0001-build-Be-sure-to-generate-sub-headers-before-includi.patch \
file://0002-build-Install-missing-libxfce4panel.h.patch \
file://0001-panel-tic-tac-toe-Remove-wrong-autoptr-define-guard.patch \
"
SRC_URI[sha256sum] = "c940dae515bef4af08a126011d2fd873ce99e815157ba8cef5332195bb60e51e"