[PATCH] src/sysdep.h: fix build failure when BOTHER is not found
Giulio Benetti
giulio.benetti at benettiengineering.com
Tue Feb 24 09:33:13 GMT 2026
Only including termios.h is not sufficient to gain access to BOTHER macro,
so let's check if it's defined, and if not include <asm/termbits.h>.
While doing this let's optimize #ifdef statement.
Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
---
src/sysdep.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/sysdep.h b/src/sysdep.h
index 9ba8836..bf5ed13 100644
--- a/src/sysdep.h
+++ b/src/sysdep.h
@@ -34,16 +34,15 @@
#ifdef _SCO
# define _IBCS2 /* So we get struct winsize :-) */
#endif
-#ifdef POSIX_TERMIOS
+#if defined(POSIX_TERMIOS) || defined(HAVE_TERMIO_H)
# include <termios.h>
+# ifndef BOTHER
+# include <asm/termbits.h>
+# endif
#else
-# ifdef HAVE_TERMIO_H
-# include <termios.h>
-# else
-# define _V7
-# ifdef HAVE_SGTTY_H
-# include <sgtty.h>
-# endif
+# define _V7
+# ifdef HAVE_SGTTY_H
+# include <sgtty.h>
# endif
#endif
#ifdef HAVE_SYS_IOCTL_H
--
2.47.3
More information about the minicom-devel
mailing list