You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2021/03/11 17:51:51 UTC
svn commit: r1887508 - in /apr/apr/branches/1.7.x: ./ mmap/unix/mmap.c
Author: ylavic
Date: Thu Mar 11 17:51:50 2021
New Revision: 1887508
URL: http://svn.apache.org/viewvc?rev=1887508&view=rev
Log:
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
Modified:
apr/apr/branches/1.7.x/ (props changed)
apr/apr/branches/1.7.x/mmap/unix/mmap.c
Propchange: apr/apr/branches/1.7.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1887506
Modified: apr/apr/branches/1.7.x/mmap/unix/mmap.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/mmap/unix/mmap.c?rev=1887508&r1=1887507&r2=1887508&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/mmap/unix/mmap.c (original)
+++ apr/apr/branches/1.7.x/mmap/unix/mmap.c Thu Mar 11 17:51:50 2021
@@ -176,6 +176,7 @@ APR_DECLARE(apr_status_t) apr_mmap_creat
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_creat
*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);