diff --git a/CMakeLists.txt b/CMakeLists.txt index 82bf79610..3e71a0017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -676,6 +676,7 @@ elseif(USE_ZLIB) ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/ioapi.c ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/unzip.c ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/zip.c) + include_directories(AFTER ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib) if(NOT MSVC) set_source_files_properties( ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/ioapi.c diff --git a/include/mgba-util/common.h b/include/mgba-util/common.h index 461c314d7..50dfec942 100644 --- a/include/mgba-util/common.h +++ b/include/mgba-util/common.h @@ -55,14 +55,14 @@ typedef intptr_t ssize_t; #define strdup _strdup #define lseek _lseek #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) -#elif defined(__wii__) -#include -typedef intptr_t ssize_t; #else #include #include #include #endif +#ifdef GEKKO +typedef intptr_t ssize_t; +#endif #ifdef PSP2 // For PATH_MAX on modern toolchains diff --git a/src/platform/switch/CMakeLists.txt b/src/platform/switch/CMakeLists.txt index a8d27e96a..41b93985d 100644 --- a/src/platform/switch/CMakeLists.txt +++ b/src/platform/switch/CMakeLists.txt @@ -4,7 +4,7 @@ find_program(BUILD_ROMFS build_romfs) find_library(GLAPI_LIBRARY glapi REQUIRED) find_library(EGL_LIBRARY EGL REQUIRED) -set(OS_DEFINES USE_VFS_FILE IOAPI_NO_64) +set(OS_DEFINES _GNU_SOURCE USE_VFS_FILE IOAPI_NO_64) list(APPEND CORE_VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-file.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-dirent.c) list(APPEND GUI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/gui-font.c) diff --git a/src/util/formatting.c b/src/util/formatting.c index 1305edfc9..f4ec707e2 100644 --- a/src/util/formatting.c +++ b/src/util/formatting.c @@ -77,6 +77,7 @@ struct tm* localtime_r(const time_t* t, struct tm* date) { localtime_s(date, t); return date; #elif defined(PSP2) + extern struct tm* sceKernelLibcLocaltime_r(const time_t* t, struct tm* date); return sceKernelLibcLocaltime_r(t, date); #else #warning localtime_r not emulated on this platform diff --git a/src/util/vfs/vfs-zip.c b/src/util/vfs/vfs-zip.c index fa9ed7656..2d353c566 100644 --- a/src/util/vfs/vfs-zip.c +++ b/src/util/vfs/vfs-zip.c @@ -42,13 +42,8 @@ enum { BLOCK_SIZE = 1024 }; #else -#ifdef USE_MINIZIP #include #include -#else -#include "third-party/zlib/contrib/minizip/zip.h" -#include "third-party/zlib/contrib/minizip/unzip.h" -#endif #include struct VDirEntryZip {