From d33466a34056e978294fcbc293521c7dbedf635e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 6 May 2026 12:22:39 +0200 Subject: [PATCH] bluez5: fix wrong use of F_GETFL and F_SETFL The pattern is to F_GETFL the flags, then clear the NONBLOCK flag and then F_SETFL the new flags. --- spa/plugins/bluez5/backend-native.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index af8cd51cd..da29d875f 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -2765,13 +2765,13 @@ static void sco_ready(struct spa_bt_transport *t) } /* Clear nonblocking flag we set for connect() */ - err = fcntl(t->fd, F_GETFL, O_NONBLOCK); + err = fcntl(t->fd, F_GETFL); if (err < 0) { td->err = -errno; goto done; } err &= ~O_NONBLOCK; - err = fcntl(t->fd, F_SETFL, O_NONBLOCK, err); + err = fcntl(t->fd, F_SETFL, err); if (err < 0) { td->err = -errno; goto done;