Closed
Description
when ForFoundationOnly.h and ForSwiftFoundationOnly.h end up being imported, compile fails due to different linkage of __CFAllocatorRespectsHintZeroWhenAllocating()
.
suggest removing it from ForFoundationOnly.h or adding CF_PRIVATE
.
<module-includes>:1:10: note: in file included from <module-includes>:1:
1 | #include "CoreFoundation.h"
| `- note: in file included from <module-includes>:1:
2 |
/opt/swift-6.0.2-RELEASE-ubuntu24.04-aarch64/usr/lib/swift/CoreFoundation/CoreFoundation.h:77:10: note: in file included from /opt/swift-6.0.2-RELEASE-ubuntu24.04-aarch64/usr/lib/swift/CoreFoundation/CoreFoundation.h:77:
75 | #include "CFConstantKeys.h"
76 |
77 | #include "ForSwiftFoundationOnly.h"
| `- note: in file included from /opt/swift-6.0.2-RELEASE-ubuntu24.04-aarch64/usr/lib/swift/CoreFoundation/CoreFoundation.h:77:
78 |
79 | #if TARGET_OS_OSX || TARGET_OS_IPHONE || TARGET_OS_WIN32 || TARGET_OS_LINUX
<unknown>:0: error: could not build C module 'CoreFoundation'
/opt/swift-6.0.2-RELEASE-ubuntu24.04-aarch64/usr/lib/swift/CoreFoundation/ForSwiftFoundationOnly.h:108:20: error: declaration of '__CFAllocatorRespectsHintZeroWhenAllocating' has a different language linkage
106 | _CF_EXPORT_SCOPE_BEGIN
107 |
108 | CF_PRIVATE Boolean __CFAllocatorRespectsHintZeroWhenAllocating(CFAllocatorRef _Nullable allocator);
| `- error: declaration of '__CFAllocatorRespectsHintZeroWhenAllocating' has a different language linkage
109 |
110 | struct __CFSwiftObject {
/opt/swift-6.0.2-RELEASE-ubuntu24.04-aarch64/usr/lib/swift/CoreFoundation/ForFoundationOnly.h:71:9: note: previous declaration is here
69 | #endif
70 |
71 | Boolean __CFAllocatorRespectsHintZeroWhenAllocating(CFAllocatorRef _Nullable allocator);
| `- note: previous declaration is here
72 | typedef CF_ENUM(CFOptionFlags, _CFAllocatorHint) {
73 | _CFAllocatorHintZeroWhenAllocating = 1
Metadata
Metadata
Assignees
Labels
No labels