Skip to content

Fix 2 Mbaud serial configuration on Linux with MUSL - #15

Open
reinauer wants to merge 1 commit into
RobSmithDev:mainfrom
reinauer:main
Open

Fix 2 Mbaud serial configuration on Linux with MUSL#15
reinauer wants to merge 1 commit into
RobSmithDev:mainfrom
reinauer:main

Conversation

@reinauer

Copy link
Copy Markdown

DrawBridge configures its serial connection at 2,000,000 baud. The Unix
fallback passed that numeric value directly to cfsetspeed().

Raw baud values are not portable speed_t values. musl rejects them, and
binaries linked to cfsetspeed@GLIBC_2.2.5 can receive EINVAL when run
with newer glibc termios compatibility code.

Translate 2000000 to B2000000 before calling cfsetspeed(), and fail
cleanly on platforms that do not provide that constant.

DrawBridge configures its serial connection at 2,000,000 baud. The Unix
fallback passed that numeric value directly to cfsetspeed().

Raw baud values are not portable speed_t values. musl rejects them, and
binaries linked to cfsetspeed@GLIBC_2.2.5 can receive EINVAL when run
with newer glibc termios compatibility code.

Translate 2000000 to B2000000 before calling cfsetspeed(), and fail
cleanly on platforms that do not provide that constant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant