Control: tags -1 + patch

On 2023-12-05 23:04 +0100, Santiago Vila wrote:

> Package: src:dradio
> Version: 3.8-2.1
> Severity: serious
> Tags: ftbfs
>
> Dear maintainer:
>
> During a rebuild of all packages in unstable, your package failed to build:
>
> --------------------------------------------------------------------------------
> gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
> -fstack-protector-strong -fstack-clash-protection -fcf-protection -c gui.c
> gui.c: In function ‘menu_create’:
> gui.c:236:20: error: invalid use of incomplete typedef ‘ITEM’ {aka ‘struct 
> tagITEM’}
>   236 |       menu_items[i]->userptr = conf_item;   /* the xml conf */
>       |                    ^~
> make[3]: *** [Makefile:308: gui.o] Error 1

The attached patch fixes this, but I have only tested that dradio
builds, not if it works.

Cheers,
       Sven

From 4baeee0b133b577e8c76dfec5bd92f77ba805bd9 Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Wed, 20 Dec 2023 17:13:56 +0100
Subject: [PATCH] Fix FTBFS with opaque ncurses

Since ncurses patchlevel 20231021 the ITEM structure is opaque, its
members cannot be addressed directly.  Use the set_item_userptr
function instead.
---
 src/gui.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gui.c b/src/gui.c
index 546b65e..0c16f45 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -233,7 +233,7 @@ MENU *menu_create()
    while (conf_item)
    {
       menu_items[i] = new_item(conf_item->label, NULL);
-      menu_items[i]->userptr = conf_item;   /* the xml conf */
+      set_item_userptr(menu_items[i], conf_item);   /* the xml conf */
       conf_item = conf_item->next;
       i--;
    }
--
2.43.0

Reply via email to