From 722c138352884b520a28363e62f4d5c09a361a5d Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 29 Mar 2024 02:18:20 +0200 Subject: [PATCH] attempt to fix build android-armeabi-v7a libretro-build-miyoo-arm32 libretro-build-ctr libretro-build-wiiu --- Makefile.libretro | 2 ++ deps/libchdr/deps/lzma-22.01/src/CpuArch.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index 2df324d4..d3a3530c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -322,6 +322,7 @@ else ifeq ($(platform), ctr) CFLAGS += -Ifrontend/3ds -I$(CTRULIB)/include CFLAGS += -Werror=implicit-function-declaration CFLAGS += -DHAVE_UNISTD_H + CFLAGS += -D_LZMA_UINT32_IS_ULONG OBJS += frontend/3ds/utils.o @@ -354,6 +355,7 @@ else ifneq (,$(filter $(platform),ngc wii wiiu)) # -mwup was removed in newer devkitPPC versions CFLAGS += -DHW_WUP CFLAGS += -I frontend/wiiu + CFLAGS += -D_LZMA_UINT32_IS_ULONG LIGHTREC_CUSTOM_MAP := 1 LIGHTREC_CUSTOM_MAP_OBJ := libpcsxcore/lightrec/mem_wiiu.o endif diff --git a/deps/libchdr/deps/lzma-22.01/src/CpuArch.c b/deps/libchdr/deps/lzma-22.01/src/CpuArch.c index 891f2df5..96e1a985 100644 --- a/deps/libchdr/deps/lzma-22.01/src/CpuArch.c +++ b/deps/libchdr/deps/lzma-22.01/src/CpuArch.c @@ -425,13 +425,16 @@ BoolInt CPU_IsSupported_AES (void) { return 0; } #else -#include - +#if (defined(__ANDROID_API__) && __ANDROID_API__ < 18) || defined(_MIYOO) || defined(NO_HWCAP) +// no getauxval/AT_HWCAP +#else #define USE_HWCAP +#endif #ifdef USE_HWCAP #include +#include #define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; } -- 2.39.5