From 6efbd1fdbc63773eacac0ab388ef40ebd147f4a5 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 12 Jun 2023 15:07:14 -0700 Subject: [PATCH] fix: do not use dispatch_queue_global_t directly Referencing this type directly is not allowed when building with the macOS 14.0 SDK. Other usages in webrtc follow this inline pattern too so going with this instead of "auto" which also works. Change-Id: I84a0ba9c78e83843bc73c71c642caca75750f127 Bug: chromium:1454356 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308560 Reviewed-by: Harald Alvestrand Reviewed-by: Tomas Gunnarsson Commit-Queue: Tomas Gunnarsson Cr-Commit-Position: refs/heads/main@{#40313} --- AUTHORS | 1 + rtc_base/async_resolver.cc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1e4161e339..de90d98670 100644 --- a/AUTHORS +++ b/AUTHORS @@ -105,6 +105,7 @@ Robert Bares Robert Mader Robert Nagy Ryan Yoakum +Samuel Attard Sarah Thompson Satender Saroha Saul Kravitz diff --git a/rtc_base/async_resolver.cc b/rtc_base/async_resolver.cc index 48c16136d2..f79200bc05 100644 --- a/rtc_base/async_resolver.cc +++ b/rtc_base/async_resolver.cc @@ -58,9 +58,9 @@ void GlobalGcdRunTask(void* context) { // Post a task into the system-defined global concurrent queue. void PostTaskToGlobalQueue( std::unique_ptr> task) { - dispatch_queue_global_t global_queue = - dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_async_f(global_queue, task.release(), &GlobalGcdRunTask); + dispatch_async_f( + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), + task.release(), &GlobalGcdRunTask); } } // namespace