Description: Include termios.h for terminal attribute functions
 ctrm.hxx uses struct termios and the tcgetattr/tcsetattr family of
 functions and their macros (TCSANOW/TCSAFLUSH/ICANON/ECHO/VMIN/VTIME),
 but never includes <termios.h>.  With GCC 15 and newer libc/ncurses the
 header is no longer pulled in transitively, causing an FTBFS in
 ctrm.cxx (incomplete type 'struct termios' and undeclared tcgetattr/
 tcsetattr).  Add the missing include to every platform branch that
 defines AFNIX_HAVE_TERM.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-08-27

--- afnix-3.8.0.orig/src/lib/plt/shl/ctrm.hxx
+++ afnix-3.8.0/src/lib/plt/shl/ctrm.hxx
@@ -32,6 +32,7 @@
 #include <sys/ioctl.h>
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 #define  AFNIX_HAVE_TERM
 #define  AFNIX_HAVE_WINSIZE
 #define  AFNIX_HAVE_DELTERM
@@ -52,6 +53,7 @@
 #include <term.h>
 #undef __lint
 #endif
+#include <termios.h>
 #define  AFNIX_HAVE_TERM
 #define  AFNIX_HAVE_WINSIZE
 #define  AFNIX_HAVE_DELTERM
@@ -66,6 +68,7 @@
 #include <sys/ioctl.h>
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 #ifdef bool
 #undef bool
 #endif
@@ -81,6 +84,7 @@
 #include <sys/ioctl.h>
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 #ifdef bool
 #undef bool
 #endif
@@ -97,6 +101,7 @@
 #include <sys/ioctl.h>
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 #define  AFNIX_HAVE_TERM
 #define  AFNIX_HAVE_WINSIZE
 #define  AFNIX_HAVE_DELTERM
@@ -110,6 +115,7 @@
 #include <sys/ioctl.h>
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 #define  AFNIX_HAVE_TERM
 #define  AFNIX_HAVE_WINSIZE
 #define  AFNIX_HAVE_DELTERM

