From: Aaron Brice <aaron@embeddedts.com>
To: linux-bluetooth@vger.kernel.org
Cc: Aaron Brice <aaron@embeddedts.com>
Subject: [PATCH BlueZ 1/1] btattach: Update for glibc 2.42 compatability
Date: Thu, 3 Sep 2026 11:27:09 -0700 [thread overview]
Message-ID: <20260903182709.473976-2-aaron@embeddedts.com> (raw)
In-Reply-To: <20260903182709.473976-1-aaron@embeddedts.com>
glibc 2.42 baud rate constants changed, use cfsetspeed to be compatible
with newer glibc.
---
tools/btattach.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/btattach.c b/tools/btattach.c
index 5f7d19093..cdd7b125b 100644
--- a/tools/btattach.c
+++ b/tools/btattach.c
@@ -64,7 +64,12 @@ static int open_serial(const char *path, unsigned int speed, bool flowctl)
memset(&ti, 0, sizeof(ti));
cfmakeraw(&ti);
- ti.c_cflag |= (speed | CLOCAL | CREAD);
+ ti.c_cflag |= (CLOCAL | CREAD);
+ if (cfsetspeed(&ti, speed) < 0) {
+ perror("Failed to set serial port speed");
+ close(fd);
+ return -1;
+ }
if (flowctl) {
/* Set flow control */
--
2.53.0
next prev parent reply other threads:[~2026-09-03 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 18:27 [PATCH BlueZ 0/1] btattach: Update for glibc 2.42 compatability Aaron Brice
2026-09-03 18:27 ` Aaron Brice [this message]
2026-09-03 21:24 ` [PATCH BlueZ 1/1] " Bastien Nocera
2026-09-03 21:25 ` Bastien Nocera
2026-09-03 21:49 ` bluez.test.bot
2026-09-04 20:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903182709.473976-2-aaron@embeddedts.com \
--to=aaron@embeddedts.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox