From 37305284191e9d2ebb2d530679d30cc34a84b2e8 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 3f1b3ae84..7c5fcefa8 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -2759,13 +2759,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;