Fix Lightrec build on Windows and Linux
authorPaul Cercueil <paul@crapouillou.net>
Mon, 30 May 2022 18:22:17 +0000 (19:22 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 30 May 2022 18:23:51 +0000 (19:23 +0100)
commit2f609094ad9ec14212fb730897ccb63f2f44bc40
treea53a9b05140da4ee8e0227f3dbeab88813ee5e5a
parent720b0c92478386b1705688ec8c24b8e09395d80c
Fix Lightrec build on Windows and Linux

Some distributions of Linux don't have the MFD_HUGETLB flag in
<linux/memfd.h>, probably because their kernel headers installed are too
old. In that case, we locally define MFD_HUGETLB to the value it should
have.

On Windows, the HAVE_MMAP macro set for GNU Lightning was also used in
libretro-common/vfs/vfs_implementation.c, causing build issues. Address
this problem by only defining HAVE_MMAP for Lightning source files.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile
libpcsxcore/lightrec/mem.c