summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-14 05:17:58 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-14 05:17:58 +0000
commit71129e7d2af6fb567e4d62406cd11b1caef54fb3 (patch)
tree4767a5148b881b0e1ab0fcea8f1797b6d1815488 /shmem
parent8f8f10695f26b2d0296e45149e851c762df93e4f (diff)
downloadlibapr-71129e7d2af6fb567e4d62406cd11b1caef54fb3.tar.gz
Fix the new shared memory code. We need to pass a pointer to
an apr_file_t to apr_file_open. Also, apr_os_file_get returns a status value, not the OS file descriptor. This gets Apache running again on Linux. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62160 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r--shmem/unix/shmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c
index 5bb6abcab..8924731d7 100644
--- a/shmem/unix/shmem.c
+++ b/shmem/unix/shmem.c
@@ -128,13 +128,13 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
#if APR_USE_SHMEM_MMAP_TMP
/* FIXME: Is APR_OS_DEFAULT sufficient? */
- status = apr_file_open(new_m->file, filename,
+ status = apr_file_open(&new_m->file, filename,
APR_READ | APR_WRITE | APR_CREATE, APR_OS_DEFAULT,
pool);
if (status != APR_SUCCESS)
return APR_EGENERAL;
- tmpfd = apr_os_file_get(&tmpfd, new_m->file);
+ status = apr_os_file_get(&tmpfd, new_m->file);
status = apr_file_trunc(new_m->file, reqsize);
if (status != APR_SUCCESS)
return APR_EGENERAL;
@@ -157,7 +157,7 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
APR_OS_DEFAULT);
if (status != APR_SUCCESS)
return APR_EGENERAL;
- tmpfd = apr_os_file_get(&tmpfd, new_m->file);
+ status = apr_os_file_get(&tmpfd, new_m->file);
#endif
mem = mmap(NULL, reqsize, PROT_READ|PROT_WRITE, MAP_SHARED, tmpfd, 0);