Skip to content

Commit f9c3858

Browse files
committed
CoreFoundation: adjust uuid.h inclusion
The Swift Runtime path always uses the UUID functions from the statically linked UUID library. However, the header was only included in the non-Windows case. The latest LLVM update makes implicit declarations invalid as per the C99 standard. Adjust the inclusion path to also include `uuid.h` on Windows when building with the Swift Runtime.
1 parent bfead15 commit f9c3858

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CoreFoundation/Base.subproj/CFUUID.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ static CFUUIDRef __CFUUIDCreateWithBytesPrimitive(CFAllocatorRef allocator, CFUU
133133

134134
#if TARGET_OS_WIN32
135135
#include <Rpc.h>
136-
#else
136+
#endif
137+
137138
#if DEPLOYMENT_RUNTIME_SWIFT
138139
#include "uuid/uuid.h"
139140
#else
141+
#if !TARGET_OS_WIN32
140142
#include <uuid/uuid.h>
141143
#endif
142144
#endif

0 commit comments

Comments
 (0)