Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-04-21 16:06:44 +0400
committerIgor Sysoev <igor@sysoev.ru>2006-04-21 16:06:44 +0400
commit4ecb4d721de0d6ddc34dfff4dce294415b64b04b (patch)
treefe9970fbe823741145cee16261003083b31e949d /src/os/unix/ngx_shmem.c
parent7d2d90ce71669e5a5ccb91386d0529df39b1c804 (diff)
nginx-0.3.41-RELEASE importrelease-0.3.41
*) Feature: the -v switch. *) Bugfix: the segmentation fault may occurred if the SSI page has remote subrequests. *) Bugfix: in FastCGI handling. *) Bugfix: if the perl modules path was not set using --with-perl_modules_path=PATH or the "perl_modules", then the segmentation fault was occurred.
Diffstat (limited to 'src/os/unix/ngx_shmem.c')
-rw-r--r--src/os/unix/ngx_shmem.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/os/unix/ngx_shmem.c b/src/os/unix/ngx_shmem.c
index 66df1bbe4..f7f831fdb 100644
--- a/src/os/unix/ngx_shmem.c
+++ b/src/os/unix/ngx_shmem.c
@@ -13,8 +13,9 @@
ngx_int_t
ngx_shm_alloc(ngx_shm_t *shm)
{
- shm->addr = mmap(NULL, shm->size,
- PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
+ shm->addr = (u_char *) mmap(NULL, shm->size,
+ PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_SHARED, -1, 0);
if (shm->addr == MAP_FAILED) {
ngx_log_error(NGX_LOG_ALERT, shm->log, ngx_errno,
@@ -29,7 +30,7 @@ ngx_shm_alloc(ngx_shm_t *shm)
void
ngx_shm_free(ngx_shm_t *shm)
{
- if (munmap(shm->addr, shm->size) == -1) {
+ if (munmap((void *) shm->addr, shm->size) == -1) {
ngx_log_error(NGX_LOG_ALERT, shm->log, ngx_errno,
"munmap(%p, %uz) failed", shm->addr, shm->size);
}
@@ -50,7 +51,8 @@ ngx_shm_alloc(ngx_shm_t *shm)
return NGX_ERROR;
}
- shm->addr = mmap(NULL, shm->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ shm->addr = (u_char *) mmap(NULL, shm->size, PROT_READ|PROT_WRITE,
+ MAP_SHARED, fd, 0);
if (shm->addr == MAP_FAILED) {
ngx_log_error(NGX_LOG_ALERT, shm->log, ngx_errno,
@@ -69,7 +71,7 @@ ngx_shm_alloc(ngx_shm_t *shm)
void
ngx_shm_free(ngx_shm_t *shm)
{
- if (munmap(shm->addr, shm->size) == -1) {
+ if (munmap((void *) shm->addr, shm->size) == -1) {
ngx_log_error(NGX_LOG_ALERT, shm->log, ngx_errno,
"munmap(%p, %uz) failed", shm->addr, shm->size);
}