diff --git a/config.c b/config.c index 15f1b857..321cf8e4 100644 --- a/config.c +++ b/config.c @@ -280,7 +280,7 @@ static void saveSkinBrowser(void) char *preloadCNF(char *path) { int fd, tst; - size_t CNF_size; + s64 CNF_size; char cnf_path[MAX_PATH]; char *RAM_p; @@ -292,7 +292,7 @@ char *preloadCNF(char *path) return NULL; } CNF_size = genLseek(fd, 0, SEEK_END); - printf("CNF_size=%lu\n", (unsigned long)CNF_size); + printf("CNF_size=%lld\n", CNF_size); genLseek(fd, 0, SEEK_SET); RAM_p = (char *)memalign(64, CNF_size); if (RAM_p == NULL) { diff --git a/filer.c b/filer.c index e5b9bdb0..0d97608e 100644 --- a/filer.c +++ b/filer.c @@ -2,6 +2,7 @@ // File name: filer.c //-------------------------------------------------------------- #include "launchelf.h" +#include typedef struct { @@ -1008,7 +1009,7 @@ int genDopen(char *path) s64 genLseek(int fd, s64 where, int how) { s64 res = lseek64(fd, where, how); - if (res == -48) { + if (res == -48 || (res == -1 && errno == 48)) { res = lseek(fd, where, how); } return res;