You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In glibc 2.41 and before, baud rate constants like B50, B75, ..., B9600, B57600, B115200, ... were enum-like values. B50 was 1, B75 was 2, etc.
In glibc 2.42 they have been redefined. B50 is now just 50, and B75 is now just 75. Additionally, the tcset{i,o,}speed and tcget{i,o,}speed functions are adjusted to deal with this internally (the kernel struct going to the ioctl still needs the legacy values, or a custom baud rate with BOTHER).
The old baud rate constants are still available as __B50, __B75, ...
On Linux, the <termios.h> interface now supports arbitrary baud rates; speed_t is redefined to simply be the baud rate specified as an unsigned int, which matches the kernel interface.
So.. is there a clean way to deal with this in the libc crate? The only portable thing for an application to do now is to manually do the TC{G,S}ETS2 ioctl and completely ignore the baud rate constants.