mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Minor fixes to 64 bit builds
This commit is contained in:
committed by
Ted John
parent
53ec220bf9
commit
645bb44eb4
@@ -294,7 +294,7 @@ if (WIN32)
|
|||||||
else (WIN32)
|
else (WIN32)
|
||||||
add_executable(${PROJECT} ${ORCT2_SOURCES} ${ORCT2_MM_SOURCES} ${RCT2_SECTIONS})
|
add_executable(${PROJECT} ${ORCT2_SOURCES} ${ORCT2_MM_SOURCES} ${RCT2_SECTIONS})
|
||||||
add_dependencies(${PROJECT} segfiles)
|
add_dependencies(${PROJECT} segfiles)
|
||||||
if (NOT APPLE)
|
if (NOT APPLE AND NOT USE_MMAP)
|
||||||
add_dependencies(${PROJECT} linkable_sections)
|
add_dependencies(${PROJECT} linkable_sections)
|
||||||
endif ()
|
endif ()
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ bool openrct2_setup_rct2_segment()
|
|||||||
int numPages = (len + pageSize - 1) / pageSize;
|
int numPages = (len + pageSize - 1) / pageSize;
|
||||||
unsigned char *dummy = malloc(numPages);
|
unsigned char *dummy = malloc(numPages);
|
||||||
|
|
||||||
err = mincore((void *)0x8a4000, len, dummy);
|
err = mincore((void *)segments, len, dummy);
|
||||||
bool pagesMissing = false;
|
bool pagesMissing = false;
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
@@ -582,8 +582,8 @@ bool openrct2_setup_rct2_segment()
|
|||||||
if (dummy[i] != 1)
|
if (dummy[i] != 1)
|
||||||
{
|
{
|
||||||
pagesMissing = true;
|
pagesMissing = true;
|
||||||
void *start = (void *)0x8a4000 + i * pageSize;
|
void *start = (void *)segments + i * pageSize;
|
||||||
void *end = (void *)0x8a4000 + (i + 1) * pageSize - 1;
|
void *end = (void *)segments + (i + 1) * pageSize - 1;
|
||||||
log_warning("required page %p - %p is not in memory!", start, end);
|
log_warning("required page %p - %p is not in memory!", start, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -602,7 +602,7 @@ bool openrct2_setup_rct2_segment()
|
|||||||
}
|
}
|
||||||
#endif // !defined(USE_MMAP)
|
#endif // !defined(USE_MMAP)
|
||||||
// section: rw data
|
// section: rw data
|
||||||
err = mprotect((void *)0x8a4000, 0x01429000 - 0x8a4000, PROT_READ | PROT_WRITE);
|
err = mprotect((void *)segments, 0x01429000 - 0x8a4000, PROT_READ | PROT_WRITE);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
perror("mprotect");
|
perror("mprotect");
|
||||||
|
|||||||
Reference in New Issue
Block a user