FreeBSD Bugzilla – Attachment 98122 Details for
Bug 136971
[patch] devel/ccache mmap fix for 8.0-BETA2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.28 KB, created by
Aragon Gouveia
on 2009-07-21 23:00:16 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Aragon Gouveia
Created:
2009-07-21 23:00:16 UTC
Size:
1.28 KB
patch
obsolete
>--- files/patch-md4.orig 2004-10-13 05:36:42.000000000 +0200 >+++ files/patch-md4 2009-07-21 23:43:36.000000000 +0200 >@@ -17,8 +17,8 @@ > > void cc_log(const char *format, ...); > void fatal(const char *msg); >---- hash.c.orig Wed Sep 8 21:36:22 2004 >-+++ hash.c Wed Sep 8 21:36:25 2004 >+--- hash.c.orig 2004-09-13 12:38:30.000000000 +0200 >++++ hash.c 2009-07-21 23:37:00.000000000 +0200 > @@ -20,17 +20,22 @@ > */ > >@@ -46,7 +46,7 @@ > } > > void hash_string(const char *s) >-@@ -46,35 +51,40 @@ >+@@ -46,35 +51,44 @@ > /* add contents of a file to the hash */ > void hash_file(const char *fname) > { >@@ -72,12 +72,16 @@ > + close(fd); > + fatal(__FUNCTION__); > + } >-+ buf = mmap(NULL, stats.st_size, PROT_READ, MAP_PRIVATE, fd, 0); >-+ if (buf == MAP_FAILED) { >-+ cc_log("Failed to mmap %s\n", fname); >-+ close(fd); >-+ fatal(__FUNCTION__); >-+ } >++ if( stats.st_size == 0 ) >++ buf = NULL; >++ else { >++ buf = mmap(NULL, stats.st_size, PROT_READ, MAP_PRIVATE, fd, 0); >++ if (buf == MAP_FAILED) { >++ cc_log("Failed to mmap %s\n", fname); >++ close(fd); >++ fatal(__FUNCTION__); >++ } >++ } > + > + hash_buffer(buf, stats.st_size); > close(fd);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136971
: 98122