all repos — mgba @ 7d672a2215643d205e0edad39e1903e49edd70d0

mGBA Game Boy Advance Emulator

All: Fix various build failure fallout
Vicki Pfau vi@endrift.com
Fri, 26 Feb 2021 02:02:25 -0800
commit

7d672a2215643d205e0edad39e1903e49edd70d0

parent

de5ee8cb30d2eb670249f9bfb2f6f7aba1902a68

M CMakeLists.txtCMakeLists.txt

@@ -676,6 +676,7 @@ list(APPEND VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-zip.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/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
M include/mgba-util/common.hinclude/mgba-util/common.h

@@ -55,13 +55,13 @@ #define snprintf _snprintf

#define strdup _strdup #define lseek _lseek #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) -#elif defined(__wii__) -#include <sys/time.h> -typedef intptr_t ssize_t; #else #include <strings.h> #include <unistd.h> #include <sys/time.h> +#endif +#ifdef GEKKO +typedef intptr_t ssize_t; #endif #ifdef PSP2
M src/platform/switch/CMakeLists.txtsrc/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)
M src/util/formatting.csrc/util/formatting.c

@@ -77,6 +77,7 @@ #ifdef _WIN32

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
M src/util/vfs/vfs-zip.csrc/util/vfs/vfs-zip.c

@@ -42,13 +42,8 @@ enum {

BLOCK_SIZE = 1024 }; #else -#ifdef USE_MINIZIP #include <minizip/zip.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> struct VDirEntryZip {