Skip to content

Commit ed6d535

Browse files
authored
Merge pull request #5 from xkzl/patch-1
Fixed DISPATCH_APPLY_AUTO issue
2 parents 8fe295c + 455d5bb commit ed6d535

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pstld/pstld.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3737,7 +3737,11 @@ dispatch_apply(size_t iterations, void *ctx, void (*function)(void *, size_t)) n
37373737
{
37383738
#pragma clang diagnostic push
37393739
#pragma clang diagnostic ignored "-Wnullability-extension"
3740-
::dispatch_apply_f(iterations, DISPATCH_APPLY_AUTO, ctx, function);
3740+
#if DISPATCH_APPLY_AUTO_AVAILABLE
3741+
::dispatch_apply_f(iterations, DISPATCH_APPLY_AUTO, ctx, function);
3742+
#else
3743+
::dispatch_apply_f(iterations, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ctx, function);
3744+
#endif
37413745
#pragma clang diagnostic pop
37423746
}
37433747

0 commit comments

Comments
 (0)