mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-24 16:53:04 +02:00
Don't include sys/mman.h when not using mprotect
This commit is contained in:
@@ -6,7 +6,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
2
amd64.c
2
amd64.c
@@ -99,7 +99,9 @@ static void (*co_swap)(cothread_t, cothread_t) = 0;
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static void co_init() {
|
static void co_init() {
|
||||||
#ifdef LIBCO_MPROTECT
|
#ifdef LIBCO_MPROTECT
|
||||||
|
2
arm.c
2
arm.c
@@ -5,7 +5,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
2
x86.c
2
x86.c
@@ -53,7 +53,9 @@ static const unsigned char co_swap_function[4096] = {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static void co_init() {
|
static void co_init() {
|
||||||
#ifdef LIBCO_MPROTECT
|
#ifdef LIBCO_MPROTECT
|
||||||
|
Reference in New Issue
Block a user