File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
CoreFoundation/Base.subproj Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 6666#include <termios.h>
6767#elif TARGET_OS_WASI
6868#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>
6974#elif TARGET_OS_LINUX
7075#include <errno.h>
7176#include <features.h>
Original file line number Diff line number Diff line change 3636@usableFromInline let memcpy = Musl . memcpy
3737@usableFromInline let memcmp = Musl . memcmp
3838#elseif canImport(WASILibc)
39- #if swift(>=6.0)
40- private import wasi_emulated_mman
41- #else
42- import wasi_emulated_mman
43- #endif
4439@usableFromInline let calloc = WASILibc . calloc
4540@usableFromInline let malloc = WASILibc . malloc
4641@usableFromInline let free = WASILibc . free
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ fileprivate let _write = Musl.write(_:_:_:)
2929fileprivate let _close = Musl . close ( _: )
3030#elseif canImport(WASILibc)
3131import WASILibc
32- @_implementationOnly import wasi_emulated_mman
3332fileprivate let _read = WASILibc . read ( _: _: _: )
3433fileprivate let _write = WASILibc . write ( _: _: _: )
3534fileprivate let _close = WASILibc . close ( _: )
You can’t perform that action at this time.
0 commit comments