diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-03-11 17:36:37 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-03-11 17:36:37 +0000 |
commit | 90b2324c3f59fab62d7d44b81e4107852e23d3a4 (patch) | |
tree | 5f2fa7d23b510122a84b8de049f1d93a8a0a14e1 /mmap | |
parent | 171e9e6717ac30ba02fe7073157eddebfbff4f47 (diff) | |
download | apr-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
Diffstat (limited to 'mmap')
-rw-r--r-- | mmap/unix/mmap.c | 6 |
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); |