Skip to content

Commit

Permalink
Follow up to r1887060: fix compilation on BEOS.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ylavic committed Mar 11, 2021
1 parent 171e9e6 commit 90b2324
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mmap/unix/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit 90b2324

Please sign in to comment.