summaryrefslogtreecommitdiff
path: root/shmem/unix
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-14 05:32:13 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-08-14 05:32:13 +0000
commit38193d62cb902a4686eaeb422d513769cbc84a3d (patch)
tree68687e97250403fcdc9e9ebc67dc9b1265ab4410 /shmem/unix
parent71129e7d2af6fb567e4d62406cd11b1caef54fb3 (diff)
downloadlibapr-38193d62cb902a4686eaeb422d513769cbc84a3d.tar.gz
Remove all warnings from the shared memory code.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62161 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem/unix')
-rw-r--r--shmem/unix/shmem.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c
index 8924731d7..2ebcea5f0 100644
--- a/shmem/unix/shmem.c
+++ b/shmem/unix/shmem.c
@@ -107,6 +107,8 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
void *mem;
#if APR_USE_SHMEM_SHMGET
struct shmid_ds shmbuf;
+ apr_uid_t uid;
+ apr_gid_t gid;
#endif
#if APR_USE_SHMEM_MMAP_TMP || APR_USE_SHMEM_MMAP_SHM || APR_USE_SHMEM_MMAP_ZERO
apr_status_t status;
@@ -145,7 +147,7 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
if (tmpfd == -1)
return errno + APR_OS_START_SYSERR;
- apr_os_file_put(new_m->file, &tmpfd, pool);
+ apr_os_file_put(&new_m->file, &tmpfd, pool);
status = apr_file_trunc(new_m->file, reqsize);
if (status != APR_SUCCESS)
{
@@ -153,8 +155,8 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
return APR_EGENERAL;
}
#elif APR_USE_SHMEM_MMAP_ZERO
- status = apr_file_open(new_m->file, "/dev/zero", APR_READ | APR_WRITE,
- APR_OS_DEFAULT);
+ status = apr_file_open(&new_m->file, "/dev/zero", APR_READ | APR_WRITE,
+ APR_OS_DEFAULT, pool);
if (status != APR_SUCCESS)
return APR_EGENERAL;
status = apr_os_file_get(&tmpfd, new_m->file);
@@ -177,7 +179,9 @@ APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize,
if (shmctl(new_m->file, IPC_STAT, &shmbuf) == -1)
return errno + APR_OS_START_SYSERR;
- apr_current_userid(&shmbuf.shm_perm.uid, &shmbuf.shm_perm.gid, pool);
+ apr_current_userid(&uid, &gid, pool);
+ shmbuf.shm_perm.uid = uid;
+ shmbuf.shm_perm.gid = gid;
if (shmctl(new_m->file, IPC_SET, &shmbuf) == -1)
return errno + APR_OS_START_SYSERR;