From 1532f1b13b79ed49927e886e5d526bb27dc5927c Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Sat, 8 Feb 2020 13:00:30 -0300 Subject: [PATCH] Fix Linux build Signed-off-by: Paul Cercueil --- Makefile | 3 ++- deps/lightning/lib/jit_memory.c | 6 +++++- deps/lightning/lib/lightning.c | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7afced68..d7f734f9 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull # dynarec ifeq "$(DYNAREC)" "lightrec" CFLAGS += -Ideps/lightning/include -Ideps/lightrec \ - -I deps/mman -DLIGHTREC -DLIGHTREC_STATIC + -DLIGHTREC -DLIGHTREC_STATIC OBJS += libpcsxcore/lightrec/plugin.o OBJS += deps/lightning/lib/jit_disasm.o \ deps/lightning/lib/jit_memory.o \ @@ -99,6 +99,7 @@ OBJS += deps/lightning/lib/jit_disasm.o \ deps/lightrec/regcache.o \ deps/lightrec/recompiler.o ifeq ($(MMAP_WIN32),1) +CFLAGS += -Ideps/mman OBJS += deps/mman/mman.o endif else ifeq "$(DYNAREC)" "ari64" diff --git a/deps/lightning/lib/jit_memory.c b/deps/lightning/lib/jit_memory.c index e6b4c73f..33b1c35f 100644 --- a/deps/lightning/lib/jit_memory.c +++ b/deps/lightning/lib/jit_memory.c @@ -19,7 +19,11 @@ #include #include -#include +#ifdef _WIN32 +# include +#else +# include +#endif /* * Prototypes diff --git a/deps/lightning/lib/lightning.c b/deps/lightning/lib/lightning.c index 3f2ab409..507abb6f 100644 --- a/deps/lightning/lib/lightning.c +++ b/deps/lightning/lib/lightning.c @@ -19,7 +19,11 @@ #include #include -#include +#ifdef _WIN32 +# include +#else +# include +#endif #if defined(__sgi) # include #endif -- 2.39.5