From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo commit in src/patchsets/openafs/patches/1.4: 015_all_ptserver.patch |
Date: | Tue, 25 Jan 2011 21:07:35 |
Message-Id: | 20110125210725.1AC6C20054@flycatcher.gentoo.org |
1 | vapier 11/01/25 21:07:25 |
2 | |
3 | Added: 015_all_ptserver.patch |
4 | Log: |
5 | Add fix from upstream for ptserver segfaults #352356 by Andrian Nord and Andrej Filipcic. |
6 | |
7 | Revision Changes Path |
8 | 1.1 src/patchsets/openafs/patches/1.4/015_all_ptserver.patch |
9 | |
10 | file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/openafs/patches/1.4/015_all_ptserver.patch?rev=1.1&view=markup |
11 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/openafs/patches/1.4/015_all_ptserver.patch?rev=1.1&content-type=text/plain |
12 | |
13 | Index: 015_all_ptserver.patch |
14 | =================================================================== |
15 | http://bugs.gentoo.org/352356 |
16 | |
17 | --- openafs-1.4.14/src/ptserver/map.c |
18 | +++ openafs-1.4.14/src/ptserver/map.c |
19 | @@ -40,6 +40,9 @@ |
20 | #else |
21 | #include "malloc.h" |
22 | #endif |
23 | +#ifdef HAVE_STDINT_H |
24 | +# include <stdint.h> |
25 | +#endif |
26 | |
27 | #undef PRINT_MAP_ERROR |
28 | /* #define MAP_DEBUG /**/ |
29 | @@ -54,10 +57,10 @@ |
30 | int m_data[MDATA]; |
31 | }; |
32 | |
33 | -#define MAP(p) ((struct bitmap*)((int)(p)&~1)) |
34 | -#define NEGMAP(p) (((int)(p))&1) |
35 | +#define MAP(p) ((struct bitmap*)((intptr_t)(p)&~1)) |
36 | +#define NEGMAP(p) (((intptr_t)(p))&1) |
37 | #define POSMAP(p) (!NEGMAP(p)) |
38 | -#define NOT_MAP(mp) ((struct map *) (((int)(mp)) ^ 1)) |
39 | +#define NOT_MAP(mp) ((struct map *) (((intptr_t)(mp)) ^ 1)) |
40 | |
41 | #define NUMBERTOBIT(n) ((n) & ((1<<LSHIFT)-1)) |
42 | #define NUMBERTOINDEX(n) ((n>>LSHIFT) & ((1<<MSHIFT)-1)) |