File tree 3 files changed +5
-6
lines changed
CoreFoundation/Base.subproj
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 66
66
#include <termios.h>
67
67
#elif TARGET_OS_WASI
68
68
#include <fcntl.h>
69
+ // Define _WASI_EMULATED_MMAN here to use the emulated mman functions in
70
+ // Foundation-side without requiring transitive clients to define it.
71
+ #undef _WASI_EMULATED_MMAN
72
+ #define _WASI_EMULATED_MMAN
73
+ #include <sys/mman.h>
69
74
#elif TARGET_OS_LINUX
70
75
#include <errno.h>
71
76
#include <features.h>
Original file line number Diff line number Diff line change 36
36
@usableFromInline let memcpy = Musl . memcpy
37
37
@usableFromInline let memcmp = Musl . memcmp
38
38
#elseif canImport(WASILibc)
39
- #if swift(>=6.0)
40
- private import wasi_emulated_mman
41
- #else
42
- import wasi_emulated_mman
43
- #endif
44
39
@usableFromInline let calloc = WASILibc . calloc
45
40
@usableFromInline let malloc = WASILibc . malloc
46
41
@usableFromInline let free = WASILibc . free
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ fileprivate let _write = Musl.write(_:_:_:)
29
29
fileprivate let _close = Musl . close ( _: )
30
30
#elseif canImport(WASILibc)
31
31
import WASILibc
32
- @_implementationOnly import wasi_emulated_mman
33
32
fileprivate let _read = WASILibc . read ( _: _: _: )
34
33
fileprivate let _write = WASILibc . write ( _: _: _: )
35
34
fileprivate let _close = WASILibc . close ( _: )
You can’t perform that action at this time.
0 commit comments