]> TLD Linux GIT Repositories - packages/clamav.git/blob - x32.patch
- updated to 0.104.2, partial PLD merge
[packages/clamav.git] / x32.patch
1 --- clamav-0.100.1/libclamav/bytecode_vm.c~     2018-06-27 21:12:10.000000000 +0200
2 +++ clamav-0.100.1/libclamav/bytecode_vm.c      2018-07-26 10:48:10.316153596 +0200
3 @@ -1248,7 +1248,11 @@ int cli_vm_execute(const struct cli_bc *
4          gettimeofday(&tv1, NULL);
5          tv1.tv_sec -= tv0.tv_sec;
6          tv1.tv_usec -= tv0.tv_usec;
7 +#ifdef __ILP32__
8 +        cli_dbgmsg("intepreter bytecode run finished in %lluus, after executing %u opcodes\n",
9 +#else
10          cli_dbgmsg("interpreter bytecode run finished in %luus, after executing %u opcodes\n",
11 +#endif
12                     tv1.tv_sec * 1000000 + tv1.tv_usec, pc);
13      }
14      if (stop == CL_EBYTECODE) {
15 --- clamav-0.104.1/libclamav/bignum_fast.h.orig 2021-11-02 20:09:25.000000000 +0100
16 +++ clamav-0.104.1/libclamav/bignum_fast.h      2021-12-11 10:43:55.832213985 +0100
17 @@ -102,7 +102,7 @@
18  #endif
19  
20  /* autodetect x86-64 and make sure we are using 64-bit digits with x86-64 asm */
21 -#if defined(__x86_64__)
22 +#if defined(__x86_64__) && !defined(__ILP32__)
23  #if defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM)
24  #error x86-64 detected, x86-32/SSE2/ARM optimizations are not valid!
25  #endif
26 @@ -117,7 +117,7 @@
27  #endif
28  
29  /* try to detect x86-32 */
30 -#if defined(__i386__) && !defined(TFM_SSE2)
31 +#if (defined(__i386__) || defined(__ILP32__)) && !defined(TFM_SSE2)
32  #if defined(TFM_X86_64) || defined(TFM_ARM)
33  #error x86-32 detected, x86-64/ARM optimizations are not valid!
34  #endif
35 --- clamav-0.104.1/libclamav/tomsfastmath/mont/fp_montgomery_reduce.c.orig      2021-12-11 10:41:02.011008906 +0100
36 +++ clamav-0.104.1/libclamav/tomsfastmath/mont/fp_montgomery_reduce.c   2021-12-11 10:41:23.713556450 +0100
37 @@ -42,7 +42,7 @@
38  : "%eax", "cc")
39  
40  /******************************************************************/
41 -#elif defined(TFM_X86_64)
42 +#elif defined(TFM_X86_64) && !defined(__ILP32__)
43  /* x86-64 code */
44  
45  #define MONT_START