chroot-bash: fix building vendored termcap library

This commit is contained in:
oreo639 2025-06-11 12:34:59 -07:00
parent 2ef05b7baa
commit 37e941305e

View file

@ -0,0 +1,20 @@
Fix compiling with fallback termcap library
https://lists.nongnu.org/archive/html/bug-bash/2024-12/msg00029.html
Taken from: https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?h=bash-5.3-testing&id=f223b24c4b299f00b64e68ca7f066e5bb4f717a0
diff --git a/lib/termcap/tparam.c b/lib/termcap/tparam.c
index c4bff088e..cd500efd8 100644
--- a/lib/termcap/tparam.c
+++ b/lib/termcap/tparam.c
@@ -30,6 +30,10 @@ extern char *malloc ();
extern char *realloc ();
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#if defined (HAVE_STRING_H)
#include <string.h>
#endif