--- freem/src/sighnd.c	2025/03/09 19:50:47	1.3
+++ freem/src/sighnd.c	2025/03/24 00:34:30	1.4
@@ -1,5 +1,5 @@
 /*
- *   $Id: sighnd.c,v 1.3 2025/03/09 19:50:47 snw Exp $
+ *   $Id: sighnd.c,v 1.4 2025/03/24 00:34:30 snw Exp $
  *    FreeM signal handlers 
  *
  *  
@@ -24,6 +24,9 @@
  *   along with FreeM.  If not, see .
  *
  *   $Log: sighnd.c,v $
+ *   Revision 1.4  2025/03/24 00:34:30  snw
+ *   Fix termios junk in sighnd.c
+ *
  *   Revision 1.3  2025/03/09 19:50:47  snw
  *   Second phase of REUSE compliance and header reformat
  *
@@ -42,7 +45,23 @@
 #include 
 #include 
 
-#include 
+#if !defined(__APPLE__) && !defined(__gnu_hurd__) && !defined(EMSCRIPTEN)
+# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__AMIGA)
+#  include 
+#  if !defined(__AMIGA)
+#   define TCGETA TIOCGETA
+#   define TCSETA TIOCSETA
+#  endif
+#  define termio termios
+# else
+#  if !defined(MSDOS)
+#    include 
+#  endif
+# endif
+#else
+# include 
+#endif
+
 #include 
 
 #include "mpsdef.h"
@@ -52,6 +71,8 @@
 #include "jobtab.h"
 #include "shmmgr.h"
 
+
+
 void m_log (int, const char *);
 int pending_signal_type = -1;