diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-03-11 17:51:50 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-03-11 17:51:50 +0000 |
commit | 7407474156decbe5bdbd2379cb90f30892ca7f95 (patch) | |
tree | 90a0b1dc972e1b302f035de3c22b0dacefbdacbc | |
parent | 8b93fb6e6abd62a5a352979e029175f03616dfe7 (diff) | |
download | apr-7407474156decbe5bdbd2379cb90f30892ca7f95.tar.gz |
Merge r1887506 from trunk:
Follow up to r1887060: fix compilation on BEOS.
poffset is undefined there, by inspection (no BEOS at hand..).
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887508 13f79535-47bb-0310-9956-ffa450edef68
-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 30e324564..95afb0754 100644 --- a/mmap/unix/mmap.c +++ b/mmap/unix/mmap.c @@ -176,6 +176,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); + set_poffset(*new, poffset); #endif mm = mmap(NULL, size + poffset, @@ -187,10 +188,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; - set_poffset(*new, poffset); + (*new)->mm = mm; (*new)->size = size; (*new)->cntxt = cont; APR_RING_ELEM_INIT(*new, link); |