]> git.pld-linux.org Git - packages/cryptsetup.git/blob - diet.patch
- rel 2; dietlibc fixes
[packages/cryptsetup.git] / diet.patch
1 --- cryptsetup-1.1.2/luks/pbkdf.c~      2009-09-11 16:11:50.000000000 +0200
2 +++ cryptsetup-1.1.2/luks/pbkdf.c       2010-06-21 11:16:57.353421474 +0200
3 @@ -174,7 +174,7 @@
4         if (gcry_md_setkey(prf, P, Plen))
5                 goto out;
6  
7 -       for (i = 1; (uint) i <= l; i++) {
8 +       for (i = 1; (unsigned int) i <= l; i++) {
9                 memset(T, 0, hLen);
10  
11                 for (u = 1; u <= c ; u++) {
12 @@ -198,7 +198,7 @@
13  
14                         memcpy(U, p, hLen);
15  
16 -                       for (k = 0; (uint) k < hLen; k++)
17 +                       for (k = 0; (unsigned int) k < hLen; k++)
18                                 T[k] ^= U[k];
19  
20                         if (perfcheck && __PBKDF2_performance) {
21 @@ -210,7 +210,7 @@
22                                 __PBKDF2_global_j++;
23                 }
24  
25 -               memcpy(DK + (i - 1) * hLen, T, (uint) i == l ? r : hLen);
26 +               memcpy(DK + (i - 1) * hLen, T, (unsigned int) i == l ? r : hLen);
27         }
28         rc = 0;
29  out:
30 --- cryptsetup-1.1.2/luks/keymanage.c.org       2010-06-21 11:25:41.010034880 +0200
31 +++ cryptsetup-1.1.2/luks/keymanage.c   2010-06-21 11:25:47.149697130 +0200
32 @@ -20,6 +20,7 @@
33  #include <sys/types.h>
34  #include <sys/stat.h>
35  #include <sys/ioctl.h>
36 +#include <limits.h>
37  #include <linux/fs.h>
38  #include <netinet/in.h>
39  #include <fcntl.h>
40 @@ -37,6 +38,10 @@
41  #include <uuid/uuid.h>
42  #include <../lib/internal.h>
43  
44 +#ifndef UINT32_MAX
45 +#define UINT32_MAX UINT_MAX
46 +#endif
47 +
48  #define div_round_up(a,b) ({           \
49         typeof(a) __a = (a);          \
50         typeof(b) __b = (b);          \
This page took 0.08969 seconds and 3 git commands to generate.