* [PATCH BlueZ 0/1] btattach: Update for glibc 2.42 compatability
@ 2026-09-03 18:27 Aaron Brice
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
2026-09-04 20:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 6+ messages in thread
From: Aaron Brice @ 2026-09-03 18:27 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Aaron Brice
btattach is not setting the baud rate correctly on systems with newer
glibc such as Ubuntu 26.04. In glibc 2.42 the baud rate termios.h
constants changed value, B115200 was 0x1002 which was the struct
termios c_cflag enum bits, but in 2.42 they changed cfsetspeed() to
accept arbitrary rates and not just the baud enum values, and B115200
was changed to the value 115200. This means you can no longer set the
speed with c_cflag |= B115200 and should use cfsetspeed() to be
compatible with both versions.
Aaron Brice (1):
btattach: Update for glibc 2.42 compatability
tools/btattach.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH BlueZ 1/1] btattach: Update for glibc 2.42 compatability
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
2026-09-03 21:24 ` Bastien Nocera
` (2 more replies)
2026-09-04 20:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
1 sibling, 3 replies; 6+ messages in thread
From: Aaron Brice @ 2026-09-03 18:27 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Aaron Brice
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ 1/1] btattach: Update for glibc 2.42 compatability
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
@ 2026-09-03 21:24 ` Bastien Nocera
2026-09-03 21:25 ` Bastien Nocera
2026-09-03 21:49 ` bluez.test.bot
2 siblings, 0 replies; 6+ messages in thread
From: Bastien Nocera @ 2026-09-03 21:24 UTC (permalink / raw)
To: Aaron Brice, linux-bluetooth
On Thu, 2026-09-03 at 11:27 -0700, Aaron Brice wrote:
> glibc 2.42 baud rate constants changed, use cfsetspeed to be
> compatible
> with newer glibc.
The explanation in your cover letter, which will not be committed,
should be in your patch's commit message, which will be committed.
Cheers
> ---
> 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 */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ 1/1] btattach: Update for glibc 2.42 compatability
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
2026-09-03 21:24 ` Bastien Nocera
@ 2026-09-03 21:25 ` Bastien Nocera
2026-09-03 21:49 ` bluez.test.bot
2 siblings, 0 replies; 6+ messages in thread
From: Bastien Nocera @ 2026-09-03 21:25 UTC (permalink / raw)
To: Aaron Brice, linux-bluetooth
Subject should be "compatibility" (3 "i"s)
On Thu, 2026-09-03 at 11:27 -0700, Aaron Brice wrote:
> 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 */
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: btattach: Update for glibc 2.42 compatability
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
2026-09-03 21:24 ` Bastien Nocera
2026-09-03 21:25 ` Bastien Nocera
@ 2026-09-03 21:49 ` bluez.test.bot
2 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2026-09-03 21:49 UTC (permalink / raw)
To: linux-bluetooth, aaron
[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1157334
---Test result---
Test Summary:
CheckPatch FAIL 0.30 seconds
GitLint PASS 0.21 seconds
BuildEll PASS 20.51 seconds
BluezMake PASS 607.12 seconds
CheckSmatch PASS 313.35 seconds
bluezmakeextell PASS 102.40 seconds
IncrementalBuild PASS 605.31 seconds
ScanBuild PASS 984.67 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,1/1] btattach: Update for glibc 2.42 compatability
WARNING:TYPO_SPELLING: 'compatability' may be misspelled - perhaps 'compatibility'?
#85:
Subject: [PATCH BlueZ 1/1] btattach: Update for glibc 2.42 compatability
^^^^^^^^^^^^^
/github/workspace/src/patch/14788391.patch total: 0 errors, 1 warnings, 13 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/patch/14788391.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
https://github.com/bluez/bluez/pull/2487
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ 0/1] btattach: Update for glibc 2.42 compatability
2026-09-03 18:27 [PATCH BlueZ 0/1] btattach: Update for glibc 2.42 compatability Aaron Brice
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
@ 2026-09-04 20:20 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2026-09-04 20:20 UTC (permalink / raw)
To: Aaron Brice; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 3 Sep 2026 11:27:08 -0700 you wrote:
> btattach is not setting the baud rate correctly on systems with newer
> glibc such as Ubuntu 26.04. In glibc 2.42 the baud rate termios.h
> constants changed value, B115200 was 0x1002 which was the struct
> termios c_cflag enum bits, but in 2.42 they changed cfsetspeed() to
> accept arbitrary rates and not just the baud enum values, and B115200
> was changed to the value 115200. This means you can no longer set the
> speed with c_cflag |= B115200 and should use cfsetspeed() to be
> compatible with both versions.
>
> [...]
Here is the summary with links:
- [BlueZ,1/1] btattach: Update for glibc 2.42 compatability
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=12f5eb726c6e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-04 20:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 18:27 [PATCH BlueZ 0/1] btattach: Update for glibc 2.42 compatability Aaron Brice
2026-09-03 18:27 ` [PATCH BlueZ 1/1] " Aaron Brice
2026-09-03 21:24 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox