From c0f0033702fb67e99900d1a6d0c12d52ea87fc9b Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Wed, 7 Jan 2026 17:34:17 -0800 Subject: [PATCH] bacula: fix build with ncurses 6.6 ncurses 6.6 moved the termios.h include inside `#ifdef NCURSES_INTERNALS` in term.h, so applications can no longer rely on term.h to provide termios symbols. Include termios.h explicitly in conio.c. Thanks to @trofi for the report. --- ...console-include-termios.h-explicitly.patch | 24 +++++++++++++++++++ pkgs/by-name/ba/bacula/package.nix | 6 +++++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/by-name/ba/bacula/0001-console-include-termios.h-explicitly.patch diff --git a/pkgs/by-name/ba/bacula/0001-console-include-termios.h-explicitly.patch b/pkgs/by-name/ba/bacula/0001-console-include-termios.h-explicitly.patch new file mode 100644 index 000000000000..e4fbca7dff61 --- /dev/null +++ b/pkgs/by-name/ba/bacula/0001-console-include-termios.h-explicitly.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Philip Taron +Date: Wed, 7 Jan 2026 17:30:51 -0800 +Subject: [PATCH] console: include termios.h explicitly + +ncurses 6.6 moved the termios.h include inside #ifdef NCURSES_INTERNALS +in term.h, so applications can no longer rely on term.h to provide +termios symbols. Include termios.h explicitly. +--- + src/console/conio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/console/conio.c b/src/console/conio.c +index 2bea887..7ac61d6 100755 +--- a/src/console/conio.c ++++ b/src/console/conio.c +@@ -56,6 +56,7 @@ + + #include + #include ++#include + + #ifdef HAVE_SUN_OS + #ifndef _TERM_H diff --git a/pkgs/by-name/ba/bacula/package.nix b/pkgs/by-name/ba/bacula/package.nix index 73e550554a97..ee2bbb35e098 100644 --- a/pkgs/by-name/ba/bacula/package.nix +++ b/pkgs/by-name/ba/bacula/package.nix @@ -21,6 +21,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-KUr9PS651bccPQ6I/fGetRO/24Q7KNNcBVLkrgYoJ6E="; }; + patches = [ + # ncurses 6.6 moved the termios.h include inside #ifdef NCURSES_INTERNALS in term.h, + # so applications can no longer rely on term.h to provide termios symbols. + ./0001-console-include-termios.h-explicitly.patch + ]; + # libtool.m4 only matches macOS 10.* postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) '' substituteInPlace configure \