mirror of https://github.com/mgba-emu/mgba.git
All: Some portability fixes
This commit is contained in:
parent
67072e649c
commit
97da8b43c9
|
@ -160,7 +160,7 @@ if(WIN32)
|
|||
list(APPEND VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-fd.c ${CMAKE_SOURCE_DIR}/src/util/vfs/vfs-dirent.c)
|
||||
file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c)
|
||||
source_group("Windows-specific code" FILES ${OS_SRC})
|
||||
else()
|
||||
elseif(UNIX)
|
||||
add_definitions(-DUSE_PTHREADS)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
|
||||
#include "util/common.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/mman.h>
|
||||
#define PATH_SEP "/"
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#define PATH_SEP "\\"
|
||||
#else
|
||||
#define PATH_SEP "/"
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
struct VFileFD {
|
||||
struct VFile d;
|
||||
|
|
Loading…
Reference in New Issue