diff --git a/Libraries/LibCore/CMakeLists.txt b/Libraries/LibCore/CMakeLists.txt index 5ed2c0bc62a..d3136184d5b 100644 --- a/Libraries/LibCore/CMakeLists.txt +++ b/Libraries/LibCore/CMakeLists.txt @@ -114,3 +114,7 @@ endif() if (ANDROID) target_link_libraries(LibCore PRIVATE log) endif() + +if (WIN32) + target_include_directories(LibCore PRIVATE ${MMAN_INCLUDE_DIR}) +endif() diff --git a/Libraries/LibCore/MappedFile.cpp b/Libraries/LibCore/MappedFile.cpp index 3660c2c9e32..c8d45a88f6a 100644 --- a/Libraries/LibCore/MappedFile.cpp +++ b/Libraries/LibCore/MappedFile.cpp @@ -9,9 +9,7 @@ #include #include #include -#include #include -#include namespace Core { @@ -30,7 +28,7 @@ ErrorOr> MappedFile::map_from_file(NonnullOwnPtr> MappedFile::map_from_fd_and_close(int fd, [[maybe_unused]] StringView path, Mode mode) { ScopeGuard fd_close_guard = [fd] { - ::close(fd); + (void)System::close(fd); }; auto stat = TRY(Core::System::fstat(fd));