[PATCH] src/sysdep.h: fix build failure when BOTHER is not found

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sat Feb 28 11:36:23 GMT 2026


Hi Giulio,

I've done a 2.11.1 by now to address this. Setting arbitrary baud rates
needed some more care for older glibc.


BR, Adam

On Tue Feb 24, 2026 at 10:58:59 +0100, Giulio Benetti wrote:
> This patch doesn't work as expected, it ends up in struct termios
> redefinition. Need another workaround.
> 
> Sorry for the noise
> 
> Best regards
> Giulio
> 
> On 2/24/26 10:33, Giulio Benetti wrote:
> > 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



More information about the minicom-devel mailing list