summaryrefslogtreecommitdiff
path: root/indra/cmake/APR.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/APR.cmake')
-rw-r--r--indra/cmake/APR.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index e0807a7d19..310659686d 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -31,3 +31,8 @@ if(DARWIN)
endif()
target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1)
+
+# Fix erroneous check for __attribute__ definition introduced with APR 1.7.5, causing lots of "this declaration may not have extern 'C' linkage" errors in VS
+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}")