From 9849da1a3e9c6269d03b82a6ec29aa59a896e6d9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 6 Sep 2025 15:23:14 +0200 Subject: [PATCH] Hotfix incorrect check in apr.h on the fly, causing tons of external C linkage errors showing up in VS --- indra/cmake/APR.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index e0807a7d19..ba5ba48ba8 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -31,3 +31,9 @@ if(DARWIN) endif() target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1) + +# Hotfix incorrect check in APR header +file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS) +string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}") +file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}") +# \ No newline at end of file