aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ElectricFence/files/patch-mmap-size
blob: e94b0b802a982afc39580bc477c86e4a21ada331 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Found at:
    http://www.redhat.com/archives/fedora-cvs-commits/2007-March/msg00788.html

Size is, correctly, size_t and mmap, correctly, takes
size_t as the size argument; the cast to int flunks
64bit thinking.

diff -Naur ElectricFence-2.2.2/page.c ElectricFence-2.2.3/page.c
--- page.c  2007-03-16 13:20:44.000000000 -0400
+++ page.c  2007-03-16 13:23:28.000000000 -0400
@@ -70,7 +70,7 @@
     */
    allocation = (caddr_t) mmap(
     startAddr
-   ,(int)size
+   ,size
    ,PROT_READ|PROT_WRITE
    ,MAP_PRIVATE|MAP_ANONYMOUS
    ,-1
@@ -122,7 +122,7 @@
     */
    allocation = (caddr_t) mmap(
     startAddr
-   ,(int)size
+   ,size
    ,PROT_READ|PROT_WRITE
    ,MAP_PRIVATE
    ,devZeroFd