Merge pull request #659 from pcercuei/update-lightrec-20220530
authorLibretroAdmin <105389611+LibretroAdmin@users.noreply.github.com>
Mon, 30 May 2022 18:34:58 +0000 (19:34 +0100)
committerGitHub <noreply@github.com>
Mon, 30 May 2022 18:34:58 +0000 (19:34 +0100)
Fix Lightrec build on Windows and Linux

Makefile
libpcsxcore/lightrec/mem.c

index d1585a1..0860c72 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,8 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
 # dynarec
 ifeq "$(DYNAREC)" "lightrec"
 CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
-                 -DLIGHTREC -DLIGHTREC_STATIC -DHAVE_MMAP
+                 -DLIGHTREC -DLIGHTREC_STATIC
+deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
 LDLIBS += -lrt
 OBJS += libpcsxcore/lightrec/mem.o
index 76608ea..c7fa7da 100644 (file)
 #define MAP_FIXED_NOREPLACE 0x100000
 #endif
 
+#ifndef MFD_HUGETLB
+#define MFD_HUGETLB 0x0004
+#endif
+
 static const uintptr_t supported_io_bases[] = {
        0x0,
        0x10000000,