Added patch with system call numbers for ARM

This commit is contained in:
Robert Scheck 2013-10-06 22:37:27 +02:00
parent 57cb746617
commit ab402e5910
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,30 @@
Patch by Robert Scheck <robert@fedoraproject.org> for clamav <= 0.98 which adds support for
ARM. The syscall is taken from arch/arm/include/asm/unistd.h from the Linux kernel. Without
this patch building on (at least) ARMv7 fails like this:
In file included from fan.c:38:0:
fan-syscalllib.h:14:3: error: #error "System call numbers not defined for this architecture"
# error "System call numbers not defined for this architecture"
^
fan-syscalllib.h: In function 'fanotify_init':
fan-syscalllib.h:19:17: error: '__NR_fanotify_init' undeclared (first use in this function)
return syscall(__NR_fanotify_init, flags, event_f_flags);
^
fan-syscalllib.h:19:17: note: each undeclared identifier is reported only once for each function it appears in
fan-syscalllib.h: In function 'fanotify_mark':
fan-syscalllib.h:25:17: error: '__NR_fanotify_mark' undeclared (first use in this function)
return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask,
^
--- clamav-0.98/clamd/fan-syscalllib.h 2013-09-16 21:28:14.000000000 +0200
+++ clamav-0.98/clamd/fan-syscalllib.h.arm-fanotify 2013-10-06 22:29:26.000000000 +0200
@@ -10,6 +10,9 @@
#elif defined(__i386__)
# define __NR_fanotify_init 338
# define __NR_fanotify_mark 339
+#elif defined(__ARM_EABI__)
+# define __NR_fanotify_init 367
+# define __NR_fanotify_mark 368
#else
# error "System call numbers not defined for this architecture"
#endif

View File

@ -79,6 +79,7 @@ Patch27: clamav-0.98-umask.patch
Patch29: clamav-0.98-jitoff.patch
# https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp?r1=128086&r2=137567
Patch30: llvm-glibc.patch
Patch31: clamav-0.98-arm-fanotify.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@ -392,6 +393,7 @@ The systemd initscripts for clamav-scanner.
%apply -n27 -p1 -b .umask
%apply -n29 -p1 -b .jitoff
%apply -n30 -p1
%apply -n31 -p1 -b .arm-fanotify
%{?apply_end}
install -p -m0644 %SOURCE300 clamav-milter/