From d40a1cc6cc54ca1df6fd3f53a7f9def2f72dcee6 Mon Sep 17 00:00:00 2001 From: CrystalCT Date: Fri, 14 Jan 2022 10:05:16 +0100 Subject: [PATCH] PS3: build fix and .lha load fix --- Makefile | 2 +- deps-ps3/ps3_functions.c | 9 --------- deps-ps3/ps3_headers.h | 6 ++---- deps/libchdr/src/libchdr_chd.c | 2 +- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 809f820c..e06208bf 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,7 @@ else ifneq (,$(filter $(platform), ps3 psl1ght)) ZLIB_DIR = $(LIBUTILS)/zlib/ LDFLAGS := -lm -lpthread -lc SOURCES_C += $(CORE_DIR)/deps-ps3/ps3_functions.c - STATIC_LINKING=1 + STATIC_LINKING=0 STATIC_LINKING_LINK=1 # Emscripten diff --git a/deps-ps3/ps3_functions.c b/deps-ps3/ps3_functions.c index a2caa57e..2ef619fe 100644 --- a/deps-ps3/ps3_functions.c +++ b/deps-ps3/ps3_functions.c @@ -1,15 +1,6 @@ #include "ps3_headers.h" #ifndef __PSL1GHT__ -int fseeko(FILE* stream, off_t pos, int whence) -{ - return fseek(stream, (long)pos, whence); -} - -off_t ftello( FILE* stream ) -{ - return (off_t)ftell(stream); -} INLINE int gettimeofday(struct timeval* tv, void* blah) { diff --git a/deps-ps3/ps3_headers.h b/deps-ps3/ps3_headers.h index 04e22bc5..ce63c898 100644 --- a/deps-ps3/ps3_headers.h +++ b/deps-ps3/ps3_headers.h @@ -13,8 +13,8 @@ #ifndef __PSL1GHT__ #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #define usleep sys_timer_usleep -#define getcwd(a,b) "/dev_hdd0/SSNE10000/USRDIR/" -#define getenv(a) "/dev_hdd0/SSNE10000/USRDIR/cores/" +#define getcwd(a,b) "/dev_hdd0/RETROARCH/USRDIR/" +#define getenv(a) "/dev_hdd0/RETROARCH/USRDIR/cores/" #define chdir(a) 0 #undef timezone @@ -36,7 +36,5 @@ struct timeb { #endif int gettimeofday(struct timeval* tv, void* blah); -int fseeko(FILE* stream, off_t pos, int whence); -off_t ftello( FILE* stream ); int ftime(struct timeb* tb); #endif diff --git a/deps/libchdr/src/libchdr_chd.c b/deps/libchdr/src/libchdr_chd.c index 913abaa2..bbb61e9b 100644 --- a/deps/libchdr/src/libchdr_chd.c +++ b/deps/libchdr/src/libchdr_chd.c @@ -48,9 +48,9 @@ #include #include +#include "zlib.h" #include "LzmaEnc.h" #include "LzmaDec.h" -#include "zlib.h" #undef TRUE #undef FALSE