mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Create variables for page size
This commit is contained in:
parent
23dfb79d33
commit
567d8fe32d
34 changed files with 137 additions and 101 deletions
|
@ -62,7 +62,7 @@ static void __zipos_dismiss(uint8_t *map, const uint8_t *cdir, long pg) {
|
|||
}
|
||||
|
||||
// unmap the executable portion beneath the local files
|
||||
mo = ROUNDDOWN(lo, getgransize());
|
||||
mo = ROUNDDOWN(lo, __gransize);
|
||||
if (mo)
|
||||
munmap(map, mo);
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void __zipos_init(void) {
|
|||
if (!fstat(fd, &st) && (map = mmap(0, st.st_size, PROT_READ, MAP_SHARED,
|
||||
fd, 0)) != MAP_FAILED) {
|
||||
if ((cdir = GetZipEocd(map, st.st_size, &err))) {
|
||||
long pagesz = getpagesize();
|
||||
long pagesz = __pagesize;
|
||||
__zipos_dismiss(map, cdir, pagesz);
|
||||
__zipos.map = map;
|
||||
__zipos.cdir = cdir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue