mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 08:52:41 +00:00
Compile in memmap.c
This commit is contained in:
parent
0b33c8f2b1
commit
be9f2b870a
@ -132,6 +132,7 @@ OBJ += frontend/frontend.o \
|
||||
libretro-common/file/dir_list.o \
|
||||
libretro-common/string/string_list.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/memmap/memmap.o \
|
||||
dir_list_special.o \
|
||||
file_ops.o \
|
||||
libretro-common/file/nbio/nbio_stdio.o \
|
||||
|
@ -27,12 +27,12 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include <memmap.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <gfx/scaler/scaler.h>
|
||||
|
||||
|
@ -34,6 +34,15 @@
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_MMAN)
|
||||
#define PROT_EXEC 0x04
|
||||
#define MAP_FAILED 0
|
||||
#define PROT_READ 0
|
||||
#define PROT_WRITE 0
|
||||
#define MAP_PRIVATE 0
|
||||
#define MAP_ANONYMOUS 0
|
||||
#endif
|
||||
|
||||
#ifndef MAP_ANONYMOUS
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
|
@ -125,13 +125,6 @@ int mprotect(void *addr, size_t len, int prot)
|
||||
}
|
||||
|
||||
#elif !defined(HAVE_MMAN)
|
||||
#define PROT_EXEC 0x04
|
||||
#define MAP_FAILED 0
|
||||
#define PROT_READ 0
|
||||
#define PROT_WRITE 0
|
||||
#define MAP_PRIVATE 0
|
||||
#define MAP_ANONYMOUS 0
|
||||
|
||||
void* mmap(void *desired_addr, size_t len, int mmap_prot, int mmap_flags, int fildes, size_t off)
|
||||
{
|
||||
return malloc(len);
|
||||
@ -162,7 +155,11 @@ int memsync(void *start, void *end)
|
||||
__clear_cache(start, end);
|
||||
return 0;
|
||||
#elif defined(HAVE_MMAN)
|
||||
return msync(start, len, MS_SYNC | MS_CACHE_ONLY | MS_INVALIDATE_ICACHE);
|
||||
return msync(start, len, MS_SYNC | MS_INVALIDATE
|
||||
#ifdef __QNX__
|
||||
MS_CACHE_ONLY
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user