From 86e007f5370b184922fe4ad920ae71470047ec01 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 26 Oct 2024 23:23:09 +0200 Subject: [PATCH] package/procps-ng: fix ncurses.h include Fixes: http://autobuild.buildroot.net/results/7f1/7f1e0b3d99db07ea46c9cd1f51b320b461623c8d/ Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni (cherry picked from commit 3c2f3c9039deb7e285e76391fdb28258c7312f9b) Signed-off-by: Peter Korsgaard --- .../0002-fix-ncurses-h-include.patch | 55 +++++++++++++++++++ package/procps-ng/procps-ng.mk | 1 + 2 files changed, 56 insertions(+) create mode 100644 package/procps-ng/0002-fix-ncurses-h-include.patch diff --git a/package/procps-ng/0002-fix-ncurses-h-include.patch b/package/procps-ng/0002-fix-ncurses-h-include.patch new file mode 100644 index 0000000000..619126b863 --- /dev/null +++ b/package/procps-ng/0002-fix-ncurses-h-include.patch @@ -0,0 +1,55 @@ +From 263fe04f9ed6f3f40fdb7ce249221e03dc926c9b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 24 Jul 2024 09:51:00 +0200 +Subject: [PATCH] fix ncurses.h include + +Commit 58559a5b64a3634460536d6397ca382a54b599f0 was not backported from +3.3.17 to 4.0.0 resulting in the following build failure when ncursesw +headers are not installed in ../usr/include/ncursesw/..: + +src/watch.c:56:11: fatal error: ncursesw/ncurses.h: No such file or directory + 56 | # include + | ^~~~~~~~~~~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/b7573be2e78f3d224f48cb3f52087e3d227d58e3 + +Signed-off-by: Fabrice Fontaine + +Upstream: https://gitlab.com/procps-ng/procps/-/commit/263fe04f9ed6f3f40fdb7ce249221e03dc926c9b + +Signed-off-by: Bernd Kuhls +[Bernd: backported to version 4.0.4] +--- + configure.ac | 2 +- + src/watch.c | 5 ++++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d433901f..38350aaf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -64,7 +64,7 @@ PROCPS_PROG_PO4A + + # Checks for header files. + AC_HEADER_MAJOR +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h utmpx.h values.h wchar.h wctype.h]) ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h ncursesw/ncurses.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h utmpx.h values.h wchar.h wctype.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_CHECK_HEADER_STDBOOL +diff --git a/src/watch.c b/src/watch.c +index ef638e00..7ec634b6 100644 +--- a/src/watch.c ++++ b/src/watch.c +@@ -53,6 +53,8 @@ + # define _XOPEN_SOURCE_EXTENDED 1 + # include + # include ++#endif ++#ifdef HAVE_NCURSESW_NCURSES_H + # include + #else + # include +-- +GitLab diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk index c30de4cb4a..dd0657150f 100644 --- a/package/procps-ng/procps-ng.mk +++ b/package/procps-ng/procps-ng.mk @@ -15,6 +15,7 @@ PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf $(TARGET_NLS_DEPENDENCIES) PROCPS_NG_CONF_OPTS = LIBS=$(TARGET_NLS_LIBS) # Applying 0001-build-sys-Add-systemd-elogind-to-w.patch touches Makefile.am +# Applying 0002-fix-ncurses-h-include.patch touches configure.ac PROCPS_NG_AUTORECONF = YES ifeq ($(BR2_PACKAGE_SYSTEMD),y)