Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src.freebsd/coreutils/stty/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,14 @@ static const speed_t baudvals[] = {
};

int get_baud(speed_t s) {
#ifdef __GLIBC__
/* in glibc the speed_t constants are the baud rate itself */
return (int)s;
#else
if (s & CBAUDEX)
s = (s & ~CBAUDEX) + 15;
return baudlist[s];
#endif
}

speed_t get_speed(unsigned long b) {
Expand Down
Loading