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:26:56 UTC

svn commit: r1887502 - /apr/apr/trunk/mmap/unix/mmap.c

Author: ylavic
Date: Thu Mar 11 17:26:56 2021
New Revision: 1887502

URL: http://svn.apache.org/viewvc?rev=1887502&view=rev
Log:
Follow up to r1887060: fix compilation on BEOS.

poffset is undefined there, by inspection (no BEOS at hand..).

Modified:
    apr/apr/trunk/mmap/unix/mmap.c

Modified: apr/apr/trunk/mmap/unix/mmap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/mmap/unix/mmap.c?rev=1887502&r1=1887501&r2=1887502&view=diff
==============================================================================
--- apr/apr/trunk/mmap/unix/mmap.c (original)
+++ apr/apr/trunk/mmap/unix/mmap.c Thu Mar 11 17:26:56 2021
@@ -144,7 +144,6 @@ APR_DECLARE(apr_status_t) apr_mmap_creat
         assert(psize > 0 && (psize & (psize - 1)) == 0);
     }
     poffset = offset & (apr_off_t)(psize - 1);
-    (*new)->poffset = poffset;
 #endif
 
     mm = mmap(NULL, size + poffset,
@@ -156,11 +155,10 @@ APR_DECLARE(apr_status_t) apr_mmap_creat
         *new = NULL;
         return errno;
     }
-
-    mm = (char *)mm + poffset;
 #endif
 
-    (*new)->mm = mm;
+    (*new)->mm = (char *)mm + poffset;
+    (*new)->poffset = poffset;
     (*new)->size = size;
     (*new)->cntxt = cont;
     APR_RING_ELEM_INIT(*new, link);