On 3/2/21 1:54 AM, Yann Ylavic wrote:
> On Tue, Mar 2, 2021 at 1:37 AM <yla...@apache.org> wrote:
>>
>> Author: ylavic
>> Date: Tue Mar 2 00:37:18 2021
>> New Revision: 1887060
>>
>> URL: http://svn.apache.org/viewvc?rev=1887060&view=rev
>> Log:
>> Align apr_mmap()ing offset to a page boundary. PR 65158.
> []
>> --- apr/apr/trunk/include/apr_mmap.h (original)
>> +++ apr/apr/trunk/include/apr_mmap.h Tue Mar 2 00:37:18 2021
>> @@ -62,11 +62,10 @@ typedef struct apr_mmap_t apr
>> struct apr_mmap_t {
>> /** The pool the mmap structure was allocated out of. */
>> apr_pool_t *cntxt;
>> -#ifdef BEOS
>> +#if defined(BEOS)
>> /** An area ID. Only valid on BeOS */
>> area_id area;
>> -#endif
>> -#ifdef WIN32
>> +#elif defined(WIN32)
>> /** The handle of the file mapping */
>> HANDLE mhandle;
>> /** The start of the real memory page area (mapped view) */
>> @@ -75,6 +74,8 @@ struct apr_mmap_t {
>> apr_off_t pstart;
>> apr_size_t psize;
>> apr_off_t poffset;
>> +#else
>> + apr_off_t poffset;
>> #endif
>> /** The start of the memory mapped area */
>> void *mm;
>
> By adding this "poffset" member to apr_mmap_t (on unixes), its layout changes.
> Can I backport this to 1.7 or should I find another way to store
> "poffset" there (like some pool/cntxt userdata)?
I don't think that this can be backported this way as it changes a non opaque
struct on the public API.
So you would need to look for a different area to store this data.
Regards
RĂ¼diger