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.
This commit is contained in:
Philip Taron
2026-01-07 17:34:17 -08:00
parent 9a8af81db6
commit c0f0033702
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Philip Taron <philip.taron@gmail.com>
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 <curses.h>
#include <term.h>
+#include <termios.h>
#ifdef HAVE_SUN_OS
#ifndef _TERM_H
+6
View File
@@ -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 \