]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
clamav: Fix compiling
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Mar 2015 11:54:22 +0000 (12:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Mar 2015 11:54:22 +0000 (12:54 +0100)
glibc headers were not correctly included

lfs/clamav
src/patches/clamav/llvm-glibc.patch [new file with mode: 0644]

index 43b50607340d2d2707a250d41d6c2730af0a9f1e..2e07ed03449dbe4a5d6df207f1cc6ffd6ec9c85e 100644 (file)
@@ -81,6 +81,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/clamav/llvm-glibc.patch
        cd $(DIR_APP) && ./configure \
                --prefix=/usr \
                --sysconfdir=/var/ipfire/clamav \
diff --git a/src/patches/clamav/llvm-glibc.patch b/src/patches/clamav/llvm-glibc.patch
new file mode 100644 (file)
index 0000000..67dbdd7
--- /dev/null
@@ -0,0 +1,12 @@
+Index: clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+===================================================================
+--- clamav-0.97.3.orig/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
++++ clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+@@ -52,6 +52,7 @@ static void runAtExitHandlers() {
+ #include <sys/stat.h>
+ #endif
+ #include <fcntl.h>
++#include <unistd.h>
+ /* stat functions are redirecting to __xstat with a version number.  On x86-64 
+  * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' 
+  * available as an exported symbol, so we have to add it explicitly.