All: Fix various build failure fallout

This commit is contained in:
Vicki Pfau 2021-02-26 02:02:25 -08:00
parent de5ee8cb30
commit 7d672a2215
5 changed files with 6 additions and 9 deletions

View File

@ -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/ioapi.c
${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/unzip.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) ${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) if(NOT MSVC)
set_source_files_properties( set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/ioapi.c ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/ioapi.c

View File

@ -55,14 +55,14 @@ typedef intptr_t ssize_t;
#define strdup _strdup #define strdup _strdup
#define lseek _lseek #define lseek _lseek
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#elif defined(__wii__)
#include <sys/time.h>
typedef intptr_t ssize_t;
#else #else
#include <strings.h> #include <strings.h>
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef GEKKO
typedef intptr_t ssize_t;
#endif
#ifdef PSP2 #ifdef PSP2
// For PATH_MAX on modern toolchains // For PATH_MAX on modern toolchains

View File

@ -4,7 +4,7 @@ find_program(BUILD_ROMFS build_romfs)
find_library(GLAPI_LIBRARY glapi REQUIRED) find_library(GLAPI_LIBRARY glapi REQUIRED)
find_library(EGL_LIBRARY EGL 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 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) list(APPEND GUI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/gui-font.c)

View File

@ -77,6 +77,7 @@ struct tm* localtime_r(const time_t* t, struct tm* date) {
localtime_s(date, t); localtime_s(date, t);
return date; return date;
#elif defined(PSP2) #elif defined(PSP2)
extern struct tm* sceKernelLibcLocaltime_r(const time_t* t, struct tm* date);
return sceKernelLibcLocaltime_r(t, date); return sceKernelLibcLocaltime_r(t, date);
#else #else
#warning localtime_r not emulated on this platform #warning localtime_r not emulated on this platform

View File

@ -42,13 +42,8 @@ enum {
BLOCK_SIZE = 1024 BLOCK_SIZE = 1024
}; };
#else #else
#ifdef USE_MINIZIP
#include <minizip/zip.h> #include <minizip/zip.h>
#include <minizip/unzip.h> #include <minizip/unzip.h>
#else
#include "third-party/zlib/contrib/minizip/zip.h"
#include "third-party/zlib/contrib/minizip/unzip.h"
#endif
#include <mgba-util/memory.h> #include <mgba-util/memory.h>
struct VDirEntryZip { struct VDirEntryZip {