Skip to content

Commit 06112d2

Browse files
More Android fixes
1 parent c38173a commit 06112d2

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/nbl/system/CFilePOSIX.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ using namespace nbl::system;
44

55
#ifdef __unix__ // WTF: can it be `defined(_NBL_PLATFORM_ANDROID_) | defined(_NBL_PLATFORM_LINUX_)` instead?
66
#include <unistd.h>
7+
#include <sys/mman.h>
78
#include <sys/types.h>
9+
810
CFilePOSIX::CFilePOSIX(
911
core::smart_refctd_ptr<ISystem>&& sys,
1012
path&& _filename,

src/nbl/system/CFileViewVirtualAllocatorPOSIX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ using namespace nbl::system;
55
#if defined(_NBL_PLATFORM_LINUX_) || defined(_NBL_PLATFORM_ANDROID_)
66
#include <sys/mman.h>
77

8-
void* CFileViewVirtualAllocatorPOSIX::alloc(size_t size) override
8+
void* CFileViewVirtualAllocatorPOSIX::alloc(size_t size)
99
{
1010
return mmap((caddr_t)0, size, PROT_WRITE|PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
1111
}
12-
bool CFileViewVirtualAllocatorPOSIX::dealloc(void* data, size_t size) override
12+
bool CFileViewVirtualAllocatorPOSIX::dealloc(void* data, size_t size)
1313
{
1414
const auto ret = munmap(data,size);
1515
return ret != -1;

src/nbl/system/ISystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void ISystem::createFile(future_t<core::smart_refctd_ptr<IFile>>& future, std::f
257257
core::smart_refctd_ptr<IFileArchive> ISystem::openFileArchive(core::smart_refctd_ptr<IFile>&& file, const std::string_view& password)
258258
{
259259
// the file backing the archive needs to be readable
260-
if (file->getFlags()&IFile::ECF_READ == 0)
260+
if ((file->getFlags()&IFile::ECF_READ) == 0)
261261
return nullptr;
262262

263263
// try the archive loaders by using the extension first

0 commit comments

Comments
 (0)