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

Giulio Benetti giulio.benetti at benettiengineering.com
Sun Mar 1 10:43:17 GMT 2026


I’ve build tested it successfully with Buildroot test-pkg.

Thank you
Best regards
Giulio Benetti

> Il giorno 1 mar 2026, alle ore 00:03, Giulio Benetti <giulio.benetti at benettiengineering.com> ha scritto:
> 
> Thanks a lot Adam, going to test soon and send patch to Buildroot.
> 
> Giulio Benetti
> 
>> Il giorno 28 feb 2026, alle ore 13:12, Adam Lackorzynski <adam at os.inf.tu-dresden.de> ha scritto:
>> 
>> 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
> 
> 
> --
> minicom-devel mailing list <minicom-devel at alioth-lists.debian.net>
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/minicom-devel




More information about the minicom-devel mailing list