summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-03-11 17:36:37 +0000
committerYann Ylavic <ylavic@apache.org>2021-03-11 17:36:37 +0000
commit90b2324c3f59fab62d7d44b81e4107852e23d3a4 (patch)
tree5f2fa7d23b510122a84b8de049f1d93a8a0a14e1
parent171e9e6717ac30ba02fe7073157eddebfbff4f47 (diff)
downloadapr-90b2324c3f59fab62d7d44b81e4107852e23d3a4.tar.gz
Follow up to r1887060: fix compilation on BEOS.
poffset is undefined there, by inspection (no BEOS at hand..). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887506 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--mmap/unix/mmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c
index 48b881332..cc0c838dc 100644
--- a/mmap/unix/mmap.c
+++ b/mmap/unix/mmap.c
@@ -144,6 +144,7 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
assert(psize > 0 && (psize & (psize - 1)) == 0);
}
poffset = offset & (apr_off_t)(psize - 1);
+ (*new)->poffset = poffset;
#endif
mm = mmap(NULL, size + poffset,
@@ -155,10 +156,11 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new,
*new = NULL;
return errno;
}
+
+ mm = (char *)mm + poffset;
#endif
- (*new)->mm = (char *)mm + poffset;
- (*new)->poffset = poffset;
+ (*new)->mm = mm;
(*new)->size = size;
(*new)->cntxt = cont;
APR_RING_ELEM_INIT(*new, link);