Skip to content

Commit b2c908e

Browse files
authored
Workaround build failure in ClamAV with zlib (#65)
zlib failed to build with a recent compiler extension (llvm/llvm-project#74676). Workaround the build failure by disabling the extension for now.
1 parent c678caa commit b2c908e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MultiSource/Applications/ClamAV/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,9 @@ if(TARGET_OS STREQUAL "Linux")
178178
find_package(Intl REQUIRED)
179179
target_link_libraries(clamscan ${Intl_LIBRARIES})
180180
endif()
181+
# zlib fails to build with correctly defined target OS macros.
182+
# (https://github.com/madler/zlib/pull/895)
183+
# Disable the compiler extension to workaround the build failure until a zlib
184+
# source update with the fix.
185+
target_compile_options(clamscan PRIVATE -fno-define-target-os-macros)
181186
llvm_test_data(clamscan ${INPUT} dbdir)

0 commit comments

Comments
 (0)