From fd240faff0900cde9852eceb84471a5178151629 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 25 Aug 2026 13:55:12 -0300 Subject: [PATCH] Fix `libdeflate` ARM64 compilation issues Signed-off-by: Juan Cruz Viotti --- cmake/FindLibDeflate.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/FindLibDeflate.cmake b/cmake/FindLibDeflate.cmake index b07a2050ef..1b830bbbb8 100644 --- a/cmake/FindLibDeflate.cmake +++ b/cmake/FindLibDeflate.cmake @@ -105,6 +105,13 @@ if(NOT LibDeflate_FOUND) target_include_directories(libdeflate PRIVATE "${LIBDEFLATE_LIB_DIR}") + # The processor feature detection this library performs on Linux reaches for + # interfaces that the C library only declares outside the strict ISO mode + # this project otherwise compiles C in + if(SOURCEMETA_OS_LINUX) + target_compile_definitions(libdeflate PRIVATE _GNU_SOURCE) + endif() + if(SOURCEMETA_COMPILER_LLVM OR SOURCEMETA_COMPILER_GCC) target_compile_options(libdeflate PRIVATE -Wno-conversion) target_compile_options(libdeflate PRIVATE -Wno-sign-conversion)