Add a patch found on RedHat mailing list. It is quite important,
where size_t is wider than int... Bump PORTREVISION.
This commit is contained in:
parent
d5d84a5f88
commit
0b7c87f9e9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=196386
2 changed files with 29 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
PORTNAME= electricfence
|
||||
PORTVERSION= 2.2.2
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_PACKETSTORM}
|
||||
MASTER_SITE_SUBDIR= UNIX/misc
|
||||
|
|
28
devel/ElectricFence/files/patch-mmap-size
Normal file
28
devel/ElectricFence/files/patch-mmap-size
Normal file
|
@ -0,0 +1,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
|
Loading…
Reference in a new issue