Hi Kevin,
Thanks for pointing that out. I will rename the Autoconf check to HAVE_CFSETSPEED_ARBITRARYCAUTION: 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. Hi Sunil, On Sun, 22 Feb 2026 12:06:48 -0800 sunilkumar.dora@windriver.com wrote:From: Sunil Dora <sunilkumar.dora@windriver.com> The Linux custom baud rate implementation accessed the struct termios members c_ispeed and c_ospeed directly. These fields are provided by glibc but are not exposed by musl, which causes the build to fail on musl-based systems. Adjust set_custom_baudrate_linux to use a capability-based approach. The Autoconf check HAVE_NUMERIC_BAUD_RATES determines whether B-constants match numeric baud rates. If they do, use the standard POSIX cfsetispeed and cfsetospeed interfaces. Otherwise, fall back to the Linux-specific termios2 interface (TCGETS2) to support arbitrary baud rates. This preserves existing behavior on glibc systems while restoring build compatibility with musl.Here are my concerns: 1) The name HAVE_NUMERIC_BAUD_RATES doesn't really describe the feature that we wish to test for. I think it should convey the fact that the implementations of cfsetospeed/cfsetispeed available on the platform are capable of accepting (and correctly using) arbitrary baud rate values. Potential names include HAVE_CFSETSPEED_ARBITRARY and HAVE_ARBITRARY_BAUD_CFSETSPEED. (But if you have some other sensible preference, that's fine too.)
You're right. I will replace perror_with_name() with a regular error() call.2) I don't think that the final perror_with_name() call is correct. (I.e. the one after the #else.) perror_with_name() should be used to print out an error message after calling a function associated with some underlying syscall. But in this instance, there is no call - I think you ought to just be using a call to error().
While looking into this, I noticed that on some architectures such as PowerPC and Alpha, the normal3) I'd like to better understand what we might be losing by eliminating the fallback to TCGETS.
Yes, that makes sense. I will update the commit title in the next version.4) You might change the commit title to something along the lines of "Modernize custom baudrate handling" or some such. This patch does much more than narrowly fixing the MUSL build failure.
Kevin