[Buildroot] [PATCH] package/atop: fix implicit waddwstr declaration

Shubham Chakraborty <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
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 <[email protected]>
---
 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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.