diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile --- a/shells/ksh93/Makefile +++ b/shells/ksh93/Makefile @@ -14,7 +14,7 @@ PORTNAME= ksh93 DISTVERSION= 93u -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= shells DIST_SUBDIR= ksh93 @@ -25,9 +25,6 @@ LICENSE= EPL -BROKEN_aarch64= Fails to compile: needs sbrk -BROKEN_riscv64= Fails to compile: needs sbrk - USES= compiler:c11 USE_GITHUB= yes diff --git a/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c new file mode 100644 --- /dev/null +++ b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c @@ -0,0 +1,25 @@ +--- src/lib/libast/vmalloc/vmbest.c.orig ++++ src/lib/libast/vmalloc/vmbest.c +@@ -1169,6 +1169,7 @@ + } + #endif /* _mem_win32 */ + ++#undef _mem_sbrk + #if _mem_sbrk /* getting space via brk/sbrk - not concurrent-ready */ + static Void_t* sbrkmem(Void_t* caddr, size_t csize, size_t nsize) + { +@@ -1265,10 +1266,13 @@ + } + } + else if(nsize == 0) +- { Vmuchar_t *addr = (Vmuchar_t*)sbrk(0); ++ { ++#if 0 ++ Vmuchar_t *addr = (Vmuchar_t*)sbrk(0); + if(addr < (Vmuchar_t*)caddr ) /* in sbrk space */ + return NIL(Void_t*); + else ++#endif + { (void)munmap(caddr, csize); + return caddr; + }