0002-fix-ncurses-h-include.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 263fe04f9ed6f3f40fdb7ce249221e03dc926c9b Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 24 Jul 2024 09:51:00 +0200
  4. Subject: [PATCH] fix ncurses.h include
  5. Commit 58559a5b64a3634460536d6397ca382a54b599f0 was not backported from
  6. 3.3.17 to 4.0.0 resulting in the following build failure when ncursesw
  7. headers are not installed in ../usr/include/ncursesw/..:
  8. src/watch.c:56:11: fatal error: ncursesw/ncurses.h: No such file or directory
  9. 56 | # include <ncursesw/ncurses.h>
  10. | ^~~~~~~~~~~~~~~~~~~~
  11. Fixes:
  12. - http://autobuild.buildroot.org/results/b7573be2e78f3d224f48cb3f52087e3d227d58e3
  13. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  14. Upstream: https://gitlab.com/procps-ng/procps/-/commit/263fe04f9ed6f3f40fdb7ce249221e03dc926c9b
  15. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  16. [Bernd: backported to version 4.0.4]
  17. ---
  18. configure.ac | 2 +-
  19. src/watch.c | 5 ++++-
  20. 2 files changed, 5 insertions(+), 2 deletions(-)
  21. diff --git a/configure.ac b/configure.ac
  22. index d433901f..38350aaf 100644
  23. --- a/configure.ac
  24. +++ b/configure.ac
  25. @@ -64,7 +64,7 @@ PROCPS_PROG_PO4A
  26. # Checks for header files.
  27. AC_HEADER_MAJOR
  28. -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])
  29. +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])
  30. # Checks for typedefs, structures, and compiler characteristics.
  31. AC_CHECK_HEADER_STDBOOL
  32. diff --git a/src/watch.c b/src/watch.c
  33. index ef638e00..7ec634b6 100644
  34. --- a/src/watch.c
  35. +++ b/src/watch.c
  36. @@ -53,6 +53,8 @@
  37. # define _XOPEN_SOURCE_EXTENDED 1
  38. # include <wchar.h>
  39. # include <wctype.h>
  40. +#endif
  41. +#ifdef HAVE_NCURSESW_NCURSES_H
  42. # include <ncursesw/ncurses.h>
  43. #else
  44. # include <ncurses.h>
  45. --
  46. GitLab