Vita: Build fixes

This commit is contained in:
Vicki Pfau 2021-08-30 17:24:54 -07:00
parent c217802829
commit 19c57e0c19
3 changed files with 5 additions and 5 deletions

View File

@ -330,7 +330,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_function(localtime_r) find_function(localtime_r)
# The strtof_l on Linux not actually exposed nor actually strtof_l # The strtof_l on Linux not actually exposed nor actually strtof_l
set(HAVE_STRTOF_L OFF) set(HAVE_STRTOF_L OFF)
elseif(NOT DEFINED PSP2) else()
find_function(localtime_r) find_function(localtime_r)
find_function(strtof_l) find_function(strtof_l)
endif() endif()

View File

@ -3,7 +3,7 @@ include("${VITASDK}/share/vita.cmake" REQUIRED)
find_program(OBJCOPY ${cross_prefix}objcopy) find_program(OBJCOPY ${cross_prefix}objcopy)
find_file(NIDDB db.json PATHS ${VITASDK} ${VITASDK}/bin ${VITASDK}/share) find_file(NIDDB db.json PATHS ${VITASDK} ${VITASDK}/bin ${VITASDK}/share)
set(OS_DEFINES IOAPI_NO_64) set(OS_DEFINES IOAPI_NO_64 _GNU_SOURCE)
set(OS_DEFINES ${OS_DEFINES} PARENT_SCOPE) set(OS_DEFINES ${OS_DEFINES} PARENT_SCOPE)
file(GLOB OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/psp2-*.c) file(GLOB OS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/psp2-*.c)

View File

@ -90,7 +90,7 @@ struct VFile* VFileOpenSce(const char* path, int flags, SceMode mode) {
bool _vfsceClose(struct VFile* vf) { bool _vfsceClose(struct VFile* vf) {
struct VFileSce* vfsce = (struct VFileSce*) vf; struct VFileSce* vfsce = (struct VFileSce*) vf;
sceIoSyncByFd(vfsce->fd); sceIoSyncByFd(vfsce->fd, 0);
return sceIoClose(vfsce->fd) >= 0; return sceIoClose(vfsce->fd) >= 0;
} }
@ -128,7 +128,7 @@ static void _vfsceUnmap(struct VFile* vf, void* memory, size_t size) {
sceIoLseek(vfsce->fd, 0, SEEK_SET); sceIoLseek(vfsce->fd, 0, SEEK_SET);
sceIoWrite(vfsce->fd, memory, size); sceIoWrite(vfsce->fd, memory, size);
sceIoLseek(vfsce->fd, cur, SEEK_SET); sceIoLseek(vfsce->fd, cur, SEEK_SET);
sceIoSyncByFd(vfsce->fd); sceIoSyncByFd(vfsce->fd, 0);
mappedMemoryFree(memory, size); mappedMemoryFree(memory, size);
} }
@ -155,7 +155,7 @@ bool _vfsceSync(struct VFile* vf, void* buffer, size_t size) {
sceIoLseek(vfsce->fd, cur, SEEK_SET); sceIoLseek(vfsce->fd, cur, SEEK_SET);
return res == size; return res == size;
} }
return sceIoSyncByFd(vfsce->fd) >= 0; return sceIoSyncByFd(vfsce->fd, 0) >= 0;
} }
struct VDir* VDirOpen(const char* path) { struct VDir* VDirOpen(const char* path) {