diff --git a/libretro-common/formats/xml/rxml.c b/libretro-common/formats/xml/rxml.c index 59e3e5a793..0f0b072a70 100644 --- a/libretro-common/formats/xml/rxml.c +++ b/libretro-common/formats/xml/rxml.c @@ -429,10 +429,7 @@ rxml_document_t *rxml_load_document(const char *path) if (!doc) goto error; - filestream_seek(file, 0, SEEK_END); - len = filestream_tell(file); - filestream_rewind(file); - + len = filestream_get_size(file); memory_buffer = (char*)malloc(len + 1); if (!memory_buffer) goto error; diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index 224fea7a5a..c34fcae506 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -249,6 +249,7 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints) if (stream->fd == -1) goto error; + #ifdef HAVE_MMAP if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_MEMORY_MAP) {