All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/atop: fix implicit waddwstr declaration
@ 2026-08-15 15:41 Shubham Chakraborty
  2026-09-01 21:34 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Shubham Chakraborty @ 2026-08-15 15:41 UTC (permalink / raw)
  To: buildroot; +Cc: Shubham Chakraborty, Ricardo Martincoski

atop uses wide-character ncurses functions such as `waddwstr` (e.g., in
drawbar.c). For `<curses.h>` to expose the prototypes for these wide-character
functions, the `_XOPEN_SOURCE_EXTENDED` macro must be defined before the
header is included.
Without these macros defined, the preprocessor skips the function prototypes.

drawbar.c:2336:33: error: implicit declaration of function 'waddwstr'

This commit fixes the build failure by adding `-D_XOPEN_SOURCE_EXTENDED`
and `-DNCURSES_WIDECHAR` to `ATOP_CFLAGS`, ensuring the ncurses headers
correctly expose the required wide-character prototypes.

Fixes :
 - https://autobuild.buildroot.org/results/b91/b91ea0722202de0d1fdeeaeea167fd1b21b6d5d6

Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
---
 package/atop/atop.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/atop/atop.mk b/package/atop/atop.mk
index 677b60ac1b..6b2c114e91 100644
--- a/package/atop/atop.mk
+++ b/package/atop/atop.mk
@@ -11,7 +11,7 @@ ATOP_LICENSE_FILES = COPYING
 ATOP_CPE_ID_VALID = YES
 ATOP_DEPENDENCIES = ncurses zlib libglib2 host-pkgconf
 
-ATOP_CFLAGS = $(TARGET_CFLAGS)
+ATOP_CFLAGS = $(TARGET_CFLAGS) -D_XOPEN_SOURCE_EXTENDED -DNCURSES_WIDECHAR
 
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 ATOP_CFLAGS += -O0
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-01 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15 15:41 [Buildroot] [PATCH] package/atop: fix implicit waddwstr declaration Shubham Chakraborty
2026-09-01 21:34 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.