Skip to content

Commit

Permalink
libast: sfmode: tweak for 64-bit (Solaris 140-MAP_TYPE_64_Bits)
Browse files Browse the repository at this point in the history
This upstreams a Solaris patch:
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/140-MAP_TYPE_64_Bits.patch

src/lib/libast/sfio/sfmode.c: _sfmode():
- Do not turn off mmap on 64-bit systems.
  • Loading branch information
McDutchie committed Jan 9, 2021
1 parent aa7713c commit 37637ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/libast/sfio/sfmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ reg int local; /* a local call */

if(f->mode&SF_GETR)
{ f->mode &= ~SF_GETR;
#ifdef MAP_TYPE
#if defined(MAP_TYPE) && (_ptr_bits < 64)
if((f->bits&SF_MMAP) && (f->tiny[0] += 1) >= (4*SF_NMAP) )
{ /* turn off mmap to avoid page faulting */
sfsetbuf(f,(Void_t*)f->tiny,(size_t)SF_UNBOUND);
Expand Down

0 comments on commit 37637ab

Please sign in to comment.