mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Question: Support for custom (non-standard) baud rates in musl
@ 2026-02-11 20:33 Dora, Sunil Kumar
  2026-02-12 15:47 ` Markus Wichmann
  2026-02-12 16:16 ` Rich Felker
  0 siblings, 2 replies; 4+ messages in thread
From: Dora, Sunil Kumar @ 2026-02-11 20:33 UTC (permalink / raw)
  To: musl@lists.openwall.com; +Cc: Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

Hi,
I am currently investigating a build issue in GDB related to setting custom (non-standard) baud rates on Linux.
From reviewing musl's termios implementation, I noticed:

  *
cfsetospeed / cfsetispeed appear to return EINVAL for non-standard baud rates.
  *
The c_ispeed / c_ospeed fields are not exposed with the same naming as in glibc.
  *
Linux-specific interfaces such as termios2, BOTHER, TCGETS2, etc., are not visible through the standard musl headers.

I would like to confirm whether the lack of support for arbitrary/custom baud rates (via BOTHER / termios2) is an intentional design decision in musl.
If custom baud rates are expected to work on musl-based Linux systems, I would appreciate guidance on the correct and supported approach.
Thank you for your time.
Best regards,
Sunil Dora


[-- Attachment #2: Type: text/html, Size: 4978 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] Question: Support for custom (non-standard) baud rates in musl
  2026-02-11 20:33 [musl] Question: Support for custom (non-standard) baud rates in musl Dora, Sunil Kumar
@ 2026-02-12 15:47 ` Markus Wichmann
  2026-02-12 16:16 ` Rich Felker
  1 sibling, 0 replies; 4+ messages in thread
From: Markus Wichmann @ 2026-02-12 15:47 UTC (permalink / raw)
  To: musl; +Cc: Kokkonda, Sundeep

Am Wed, Feb 11, 2026 at 08:33:46PM +0000 schrieb Dora, Sunil Kumar:
> Hi,
> I am currently investigating a build issue in GDB related to setting custom (non-standard) baud rates on Linux.
> From reviewing musl's termios implementation, I noticed:
> 
>   *
> cfsetospeed / cfsetispeed appear to return EINVAL for non-standard baud rates.
>   *
> The c_ispeed / c_ospeed fields are not exposed with the same naming as in glibc.
>   *
> Linux-specific interfaces such as termios2, BOTHER, TCGETS2, etc., are not visible through the standard musl headers.
> 
> I would like to confirm whether the lack of support for arbitrary/custom baud rates (via BOTHER / termios2) is an intentional design decision in musl.
> If custom baud rates are expected to work on musl-based Linux systems, I would appreciate guidance on the correct and supported approach.
> Thank you for your time.
> Best regards,
> Sunil Dora
> 

There is currently no support for arbitrary baud rates. If it is ever
added, then likely via cfsetospeed().

Ciao,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] Question: Support for custom (non-standard) baud rates in musl
  2026-02-11 20:33 [musl] Question: Support for custom (non-standard) baud rates in musl Dora, Sunil Kumar
  2026-02-12 15:47 ` Markus Wichmann
@ 2026-02-12 16:16 ` Rich Felker
  2026-02-12 17:07   ` Dora, Sunil Kumar
  1 sibling, 1 reply; 4+ messages in thread
From: Rich Felker @ 2026-02-12 16:16 UTC (permalink / raw)
  To: Dora, Sunil Kumar; +Cc: musl@lists.openwall.com, Kokkonda, Sundeep

On Wed, Feb 11, 2026 at 08:33:46PM +0000, Dora, Sunil Kumar wrote:
> Hi,
> I am currently investigating a build issue in GDB related to setting custom (non-standard) baud rates on Linux.
> >From reviewing musl's termios implementation, I noticed:
> 
>   *
> cfsetospeed / cfsetispeed appear to return EINVAL for non-standard baud rates.
>   *
> The c_ispeed / c_ospeed fields are not exposed with the same naming as in glibc.
>   *
> Linux-specific interfaces such as termios2, BOTHER, TCGETS2, etc., are not visible through the standard musl headers.
> 
> I would like to confirm whether the lack of support for arbitrary/custom baud rates (via BOTHER / termios2) is an intentional design decision in musl.
> If custom baud rates are expected to work on musl-based Linux systems, I would appreciate guidance on the correct and supported approach.

There was a thread on this topic a while back,
https://www.openwall.com/lists/musl/2024/04/11/5

I don't think we arrived at any good conclusion for the right way to
support this.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [musl] Question: Support for custom (non-standard) baud rates in musl
  2026-02-12 16:16 ` Rich Felker
@ 2026-02-12 17:07   ` Dora, Sunil Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Dora, Sunil Kumar @ 2026-02-12 17:07 UTC (permalink / raw)
  To: Rich Felker; +Cc: musl@lists.openwall.com, Kokkonda, Sundeep, MacLeod, Randy

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

Hi Rich,

Thanks for the reference and for pointing me to that thread — that’s helpful.
I’ll take this into account while preparing the GDB fix.

Best regards,
Sunil
________________________________
From: Rich Felker <dalias@libc.org>
Sent: Thursday, February 12, 2026 9:46 PM
To: Dora, Sunil Kumar <SunilKumar.Dora@windriver.com>
Cc: musl@lists.openwall.com <musl@lists.openwall.com>; Kokkonda, Sundeep <Sundeep.Kokkonda@windriver.com>
Subject: Re: [musl] Question: Support for custom (non-standard) baud rates in musl

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Wed, Feb 11, 2026 at 08:33:46PM +0000, Dora, Sunil Kumar wrote:
> Hi,
> I am currently investigating a build issue in GDB related to setting custom (non-standard) baud rates on Linux.
> >From reviewing musl's termios implementation, I noticed:
>
>   *
> cfsetospeed / cfsetispeed appear to return EINVAL for non-standard baud rates.
>   *
> The c_ispeed / c_ospeed fields are not exposed with the same naming as in glibc.
>   *
> Linux-specific interfaces such as termios2, BOTHER, TCGETS2, etc., are not visible through the standard musl headers.
>
> I would like to confirm whether the lack of support for arbitrary/custom baud rates (via BOTHER / termios2) is an intentional design decision in musl.
> If custom baud rates are expected to work on musl-based Linux systems, I would appreciate guidance on the correct and supported approach.

There was a thread on this topic a while back,
https://www.openwall.com/lists/musl/2024/04/11/5

I don't think we arrived at any good conclusion for the right way to
support this.

Rich

[-- Attachment #2: Type: text/html, Size: 3806 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-12 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 20:33 [musl] Question: Support for custom (non-standard) baud rates in musl Dora, Sunil Kumar
2026-02-12 15:47 ` Markus Wichmann
2026-02-12 16:16 ` Rich Felker
2026-02-12 17:07   ` Dora, Sunil Kumar

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).