File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
CoreFoundation/Base.subproj Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1171,10 +1171,20 @@ CF_EXPORT
1171
1171
1172
1172
CF_PRIVATE os_unfair_recursive_lock CFPlugInGlobalDataLock ;
1173
1173
1174
+ #if __HAS_DISPATCH__
1175
+ extern void libdispatch_init ();
1176
+ #endif
1177
+
1174
1178
void __CFInitialize (void ) {
1175
1179
if (!__CFInitialized && !__CFInitializing ) {
1176
1180
__CFInitializing = 1 ;
1177
1181
1182
+ #if __HAS_DISPATCH__
1183
+ // libdispatch has to be initialized before CoreFoundation, so to avoid
1184
+ // issues with static initializer ordering, we are doing it explicitly.
1185
+ libdispatch_init ();
1186
+ #endif
1187
+
1178
1188
// This is a no-op on Darwin, but is needed on Linux and Windows.
1179
1189
_CFPerformDynamicInitOfOSRecursiveLock (& CFPlugInGlobalDataLock );
1180
1190
You can’t perform that action at this time.
0 commit comments