From 4278aeace7e52a73044917ec82046ca102eb6455 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 24 Jun 2026 09:58:24 -0700 Subject: [PATCH] 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 --- ...oe-Remove-wrong-autoptr-define-guard.patch | 42 +++++++++++++++++++ .../xfce4-panel/xfce4-panel_4.21.1.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-xfce/recipes-xfce/xfce4-panel/files/0001-panel-tic-tac-toe-Remove-wrong-autoptr-define-guard.patch diff --git a/meta-xfce/recipes-xfce/xfce4-panel/files/0001-panel-tic-tac-toe-Remove-wrong-autoptr-define-guard.patch b/meta-xfce/recipes-xfce/xfce4-panel/files/0001-panel-tic-tac-toe-Remove-wrong-autoptr-define-guard.patch new file mode 100644 index 0000000000..493e468bc4 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfce4-panel/files/0001-panel-tic-tac-toe-Remove-wrong-autoptr-define-guard.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + 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 diff --git a/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.21.1.bb b/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.21.1.bb index 350784e083..1998a9f23e 100644 --- a/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.21.1.bb +++ b/meta-xfce/recipes-xfce/xfce4-panel/xfce4-panel_4.21.1.bb @@ -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"