Skip to content

Commit 5b9797f

Browse files
authored
Merge pull request #2921 from scentini/import-glibc
Explicitly import Glibc in files that rely on it
2 parents 3d5f197 + 830d22f commit 5b9797f

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

Sources/Foundation/Data.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ internal func malloc_good_size(_ size: Int) -> Int {
2121

2222
@_implementationOnly import CoreFoundation
2323

24+
#if canImport(Glibc)
25+
import Glibc
26+
#endif
27+
2428
internal func __NSDataInvokeDeallocatorUnmap(_ mem: UnsafeMutableRawPointer, _ length: Int) {
2529
#if os(Windows)
2630
UnmapViewOfFile(mem)

Sources/Foundation/NSLock.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
//
99

1010
@_implementationOnly import CoreFoundation
11+
12+
#if canImport(Glibc)
13+
import Glibc
14+
#endif
15+
1116
#if os(Windows)
1217
import WinSDK
1318
#endif

Sources/Foundation/Thread.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
@_implementationOnly import CoreFoundation
1111

12+
#if canImport(Glibc)
13+
import Glibc
14+
#endif
15+
1216
// WORKAROUND_SR9811
1317
#if os(Windows)
1418
internal typealias _swift_CFThreadRef = HANDLE

0 commit comments

Comments
 (0)